Efficient rounding for deblocking

ABSTRACT

The present disclosure relates to deblocking filtering which is applicable to smoothing the block boundaries in an image or video coding and decoding. In particular, the deblocking filtering is either strong or weak, wherein the clipping is performed differently in the strong filtering and the weak filtering.

CROSS REFERENCE TO RELATED APPLICATIONS

This is a continuation application of PCT International Application No.PCT/EP2012/071748 filed on Nov. 2, 2012, designating the United Statesof America, which is based on and claims priority of U.S. ProvisionalPatent Application No. 61/555,181 filed on Nov. 3, 2011. The entiredisclosures of the above-identified applications, including thespecifications, drawings and claims are incorporated herein by referencein their entirety.

FIELD

One or more exemplary embodiments disclosed herein relate to thefiltering of images, and particularly to deblocking filtering and torounding employed in the deblocking filtering operations.

BACKGROUND

At present, the majority of standardized video coding algorithms arebased on hybrid video coding. Hybrid video coding methods typicallycombine several different lossless and lossy compression schemes inorder to achieve the desired compression gain. Hybrid video coding isalso the basis for ITU-T standards (H.26x standards such as H.261,H.263) as well as ISO/IEC standards (MPEG-X standards such as MPEG-1,MPEG-2, and MPEG-4). The most recent and advanced video coding standardis currently the standard denoted as H.264/MPEG-4 advanced video coding(AVC) which is a result of standardization efforts by joint video team(JVT), a joint team of ITU-T and ISO/IEC MPEG groups. This codec isbeing further developed by Joint Collaborative Team on Video Coding(JCT-VC) under a name High-Efficiency Video Coding (HEVC), aiming, inparticular at improvements of efficiency regarding the high-resolutionvideo coding.

A video signal input to an encoder is a sequence of images calledframes, each frame being a two-dimensional matrix of pixels. All theabove-mentioned standards based on hybrid video coding includesubdividing each individual video frame into smaller blocks consistingof a plurality of pixels. The size of the blocks may vary, for instance,in accordance with the content of the image. The way of coding may betypically varied on a per block basis. The largest possible size forsuch a block, for instance in HEVC, is 64×64 pixels. It is then calledthe largest coding unit (LCU). In H.264/MPEG-4 AVC, a macroblock(usually denoting a block of 16×16 pixels) was the basic image element,for which the encoding is performed, with a possibility to furtherdivide it in smaller subblocks to which some of the coding/decodingsteps were applied.

Typically, the encoding steps of a hybrid video coding include a spatialand/or a temporal prediction. Accordingly, each block to be encoded isfirst predicted using either the blocks in its spatial neighborhood orblocks from its temporal neighborhood, i.e. from previously encodedvideo frames. A block of differences between the block to be encoded andits prediction, also called block of prediction residuals, is thencalculated. Another encoding step is a transformation of a block ofresiduals from the spatial (pixel) domain into a frequency domain. Thetransformation aims at reducing the correlation of the input block.Further encoding step is quantization of the transform coefficients. Inthis step the actual lossy (irreversible) compression takes place.Usually, the compressed transform coefficient values are furthercompacted (losslessly compressed) by means of an entropy coding. Inaddition, side information necessary for reconstruction of the encodedvideo signal is encoded and provided together with the encoded videosignal. This is for example information about the spatial and/ortemporal prediction, amount of quantization, etc.

SUMMARY Technical Problem

However, there is the problem that the deblocking filtering method usedin conventional image coding methods and image decoding methods isineffective.

Solution to Problem

In one general aspect, the techniques disclosed here feature a filteringmethod for applying a deblocking filter to a current block of an image,the filtering method including: judging whether a strong filter or aweak filter is to be applied to a boundary between the current block anda neighboring block adjacent to the current block; calculating a linearcombination of current samples in the current block and adjacent samplesin the neighboring block, the current samples and the adjacent samplesforming a line of samples; shifting the linear combination right by apredetermined number of bits; and clipping the shifted linearcombination to generate a filtered sample of the filtered current block,wherein the clipping for the strong filter is controlled by a firstclipping parameter and the clipping for the weak filter is controlled bya second clipping parameter, the first clipping parameter and the secondclipping parameter depending on a strength of the boundary but having adifferent value with each other.

General and specific aspect(s) disclosed above may be implemented usinga system, a method, an integrated circuit, a computer program, or acomputer-readable recording medium such as a CD-ROM, or any combinationof systems, methods, integrated circuits, computer programs, orcomputer-readable recording media.

Additional benefits and advantages of the disclosed embodiments will beapparent from the Specification and Drawings. The benefits and/oradvantages may be individually obtained by the various embodiments andfeatures of the Specification and Drawings, which need not all beprovided in order to obtain one or more of such benefits and/oradvantages.

Advantageous Effects

Given these problems with the existing technology, it would beadvantageous to provide an efficient deblocking filtering approach.

BRIEF DESCRIPTION OF DRAWINGS

These and other advantages and features will become apparent from thefollowing description thereof taken in conjunction with the accompanyingDrawings by way of non-limiting examples of embodiments disclosedherein.

FIG. 1 is a block diagram illustrating an example of a video encoder.

FIG. 2 is a block diagram illustrating an example of a video decoder.

FIG. 3 is a block diagram illustrating an example of a video encoderwith separated vertical and horizontal filtering.

FIG. 4A is a schematic drawing illustrating application of horizontaldeblocking filtering.

FIG. 4B is a schematic drawing illustrating application of verticaldeblocking filtering.

FIG. 5 is a schematic drawing illustrating a decision to apply or not toapply deblocking filter and a selection of a deblocking filter.

FIG. 6A is a schematic drawing illustrating an example of pixels closeto a common boundary of two blocks involved in strong and weakdeblocking filtering.

FIG. 6B is a schematic drawing illustrating an example of pixels closeto a common boundary of two blocks involved in strong and weakdeblocking filtering.

FIG. 7 is a table illustrating the results of the rounding operation.

FIG. 8 is a schematic drawing illustrating asymmetry of a deltaquantizer.

FIG. 9A is a schematic drawing illustrating quantization of delta inaccordance with an example of the present disclosure.

FIG. 9B is a schematic drawing illustrating quantization of delta inaccordance with an example of the present disclosure.

FIG. 10 is a flow diagram illustrating a method according to anembodiment of the present disclosure.

FIG. 11 is a graph illustrating results achieved by an embodiment of thepresent disclosure, compared to the state of the art

FIG. 12 illustrates an overall configuration of a content providingsystem for implementing content distribution services.

FIG. 13 illustrates an overall configuration of a digital broadcastingsystem.

FIG. 14 illustrates a block diagram illustrating an example of aconfiguration of a television.

FIG. 15 illustrates a block diagram illustrating an example of aconfiguration of an information reproducing/recording unit that readsand writes information from and on a recording medium that is an opticaldisk.

FIG. 16 illustrates an example of a configuration of a recording mediumthat is an optical disk.

FIG. 17A illustrates an example of a cellular phone.

FIG. 17B is a block diagram showing an example of a configuration of acellular phone.

FIG. 18 illustrates a structure of multiplexed data.

FIG. 19 schematically illustrates how each stream is multiplexed inmultiplexed data.

FIG. 20 illustrates how a video stream is stored in a stream of PESpackets in more detail.

FIG. 21 illustrates a structure of TS packets and source packets in themultiplexed data.

FIG. 22 illustrates a data structure of a PMT.

FIG. 23 illustrates an internal structure of multiplexed datainformation.

FIG. 24 illustrates an internal structure of stream attributeinformation.

FIG. 25 illustrates steps for identifying video data.

FIG. 26 illustrates an example of a configuration of an integratedcircuit for implementing the moving picture coding method according toeach of embodiments.

FIG. 27 illustrates a configuration for switching between drivingfrequencies.

FIG. 28 illustrates steps for identifying video data and switchingbetween driving frequencies.

FIG. 29 illustrates an example of a look-up table in which video datastandards are associated with driving frequencies.

FIG. 30A is a diagram showing an example of a configuration for sharinga module of a signal processing unit.

FIG. 30B is a diagram showing another example of a configuration forsharing a module of the signal processing unit.

DESCRIPTION OF EMBODIMENTS Underlying Knowledge Forming Basis of thePresent Disclosure

FIG. 1 is an example of a typical H.264/MPEG-4 AVC and/or HEVC videoencoder 100. A subtractor 105 first determines differences e between acurrent block to be encoded of an input video image (input signal s) anda corresponding prediction block ŝ, which is used as a prediction of thecurrent block to be encoded. The prediction signal may be obtained by atemporal or by a spatial prediction 180. The type of prediction can bevaried on a per frame basis or on a per block basis. Blocks and/orframes predicted using temporal prediction are called “inter”-encodedand blocks and/or frames predicted using spatial prediction are called“intra”-encoded. Prediction signal using temporal prediction is derivedfrom the previously encoded images, which are stored in a memory. Theprediction signal using spatial prediction is derived from the values ofboundary pixels in the neighboring blocks, which have been previouslyencoded, decoded, and stored in the memory. The difference e between theinput signal and the prediction signal, denoted prediction error orresidual, is transformed 110 resulting in coefficients, which arequantized 120. Entropy encoder 190 is then applied to the quantizedcoefficients in order to further reduce the amount of data to be storedand/or transmitted in a lossless way. This is mainly achieved byapplying a code with code words of variable length wherein the length ofa code word is chosen based on the probability of its occurrence.

Within the video encoder 100, a decoding unit is incorporated forobtaining a decoded (reconstructed) video signal s′. In compliance withthe encoding steps, the decoding steps include dequantization andinverse transformation 130. The so obtained prediction error signal e′differs from the original prediction error signal due to thequantization error, called also quantization noise. A reconstructedimage signal s′ is then obtained by adding 140 the decoded predictionerror signal e′ to the prediction signal ŝ. In order to maintain thecompatibility between the encoder side and the decoder side, theprediction signal ŝ is obtained based on the encoded and subsequentlydecoded video signal which is known at both sides the encoder and thedecoder.

Due to the quantization, quantization noise is superposed to thereconstructed video signal. Due to the block-wise coding, the superposednoise often has blocking characteristics, which result, in particularfor strong quantization, in visible block boundaries in the decodedimage. Such blocking artifacts have a negative effect upon human visualperception. In order to reduce these artifacts, a deblocking filter 150is applied to every reconstructed image block. The deblocking filter isapplied to the reconstructed signal s′. For instance, the deblockingfilter of H.264/MPEG-4 AVC has the capability of local adaptation. Inthe case of a high degree of blocking noise, a strong (narrow-band) lowpass filter is applied, whereas for a low degree of blocking noise, aweaker (broad-band) low pass filter is applied. The strength of the lowpass filter is determined by the prediction signal ŝ and by thequantized prediction error signal e′. Deblocking filter generallysmoothes the block edges leading to an improved subjective quality ofthe decoded images. Moreover, since the filtered part of an image isused for the motion compensated prediction of further images, thefiltering also reduces the prediction errors, and thus enablesimprovement of coding efficiency.

After a deblocking filter, a sample adaptive offset 155 and/or adaptiveloop filter 160 may be applied to the image including the alreadydeblocked signal s″. Whereas the deblocking filter improves thesubjective quality, sample adaptive offset (SAO) and ALF aim atimproving the pixel-wise fidelity (“objective” quality). In particular,SAO adds an offset in accordance with the immediate neighborhood of apixel. The adaptive loop filter (ALF) is used to compensate imagedistortion caused by the compression. Typically, the adaptive loopfilter is a Wiener filter with filter coefficients determined such thatthe mean square error (MSE) between the reconstructed s′ and sourceimages s is minimized. The coefficients of ALF may be calculated andtransmitted on a frame basis. ALF can be applied to the entire frame(image of the video sequence) or to local areas (blocks). Additionalside information indicating which areas are to be filtered may betransmitted (block-based, frame-based or quadtree-based).

In order to be decoded, inter-encoded blocks require also storing thepreviously encoded and subsequently decoded portions of image(s) in thereference frame buffer 170. An inter-encoded block is predicted 180 byemploying motion compensated prediction. First, a best-matching block isfound for the current block within the previously encoded and decodedvideo frames by a motion estimator.

The best-matching block then becomes a prediction signal and therelative displacement (motion) between the current block and its bestmatch is then signalized as motion data in the form of three-dimensionalmotion vectors within the side information provided together with theencoded video data. The three dimensions consist of two spatialdimensions and one temporal dimension. In order to optimize theprediction accuracy, motion vectors may be determined with a spatialsub-pixel resolution e.g. half pixel or quarter pixel resolution. Amotion vector with spatial sub-pixel resolution may point to a spatialposition within an already decoded frame where no real pixel value isavailable, i.e. a sub-pixel position. Hence, spatial interpolation ofsuch pixel values is needed in order to perform motion compensatedprediction. This may be achieved by an interpolation filter (in FIG. 1integrated within Prediction block 180).

For both, the intra- and the inter-encoding modes, the differences ebetween the current input signal and the prediction signal aretransformed 110 and quantized 120, resulting in the quantizedcoefficients. Generally, an orthogonal transformation such as atwo-dimensional discrete cosine transformation (DCT) or an integerversion thereof is employed since it reduces the correlation of thenatural video images efficiently. After the transformation, lowerfrequency components are usually more important for image quality thenhigh frequency components so that more bits can be spent for coding thelow frequency components than the high frequency components. In theentropy coder, the two-dimensional matrix of quantized coefficients isconverted into a one-dimensional array. Typically, this conversion isperformed by a so-called zig-zag scanning, which starts with theDC-coefficient in the upper left corner of the two-dimensional array andscans the two-dimensional array in a predetermined sequence ending withan AC coefficient in the lower right corner. As the energy is typicallyconcentrated in the left upper part of the two-dimensional matrix ofcoefficients, corresponding to the lower frequencies, the zig-zagscanning results in an array where usually the last values are zero.This allows for efficient encoding using run-length codes as a partof/before the actual entropy coding.

The H.264/MPEG-4 H.264/MPEG-4 AVC as well as HEVC includes twofunctional layers, a Video Coding Layer (VCL) and a Network AbstractionLayer (NAL). The VCL provides the encoding functionality as brieflydescribed above. The NAL encapsulates information elements intostandardized units called NAL units according to their furtherapplication such as transmission over a channel or storing in storage.The information elements are, for instance, the encoded prediction errorsignal or other information necessary for the decoding of the videosignal such as type of prediction, quantization parameter, motionvectors, etc. There are VCL NAL units containing the compressed videodata and the related information, as well as non-VCL units encapsulatingadditional data such as parameter set relating to an entire videosequence, or a Supplemental Enhancement Information (SEI) providingadditional information that can be used to improve the decodingperformance.

FIG. 2 illustrates an example decoder 200 according to the H.264/MPEG-4AVC or HEVC video coding standard. The encoded video signal (inputsignal to the decoder) first passes to entropy decoder 290, whichdecodes the quantized coefficients, the information elements necessaryfor decoding such as motion data, mode of prediction etc. The quantizedcoefficients are inversely scanned in order to obtain a two-dimensionalmatrix, which is then fed to inverse quantization and inversetransformation 230. After inverse quantization and inversetransformation 230, a decoded (quantized) prediction error signal e′ isobtained, which corresponds to the differences obtained by subtractingthe prediction signal from the signal input to the encoder in the caseno quantization noise is introduced and no error occurred.

The prediction signal is obtained from either a temporal or a spatialprediction 280. The decoded information elements usually further includethe information necessary for the prediction such as prediction type inthe case of intra-prediction and motion data in the case of motioncompensated prediction. The quantized prediction error signal in thespatial domain is then added with an adder 240 to the prediction signalobtained either from the motion compensated prediction or intra-frameprediction 280. The reconstructed image s′ may be passed through adeblocking filter 250, sample adaptive offset processing 255, and anadaptive loop filter 260 and the resulting decoded signal is stored inthe memory 270 to be applied for temporal or spatial prediction of thefollowing blocks/images.

When compressing and decompressing an image, the blocking artifacts aretypically the most annoying artifacts for the user. The deblockingfiltering helps to improve the perceptual experience of the user bysmoothing the edges between the blocks in the reconstructed image. Oneof the difficulties in deblocking filtering is to correctly decidebetween an edge caused by blocking due to the application of a quantizerand between edges which are part of the coded signal. Application of thedeblocking filter is only desirable if the edge on the block boundary isdue to compression artifacts. In other cases, by applying the deblockingfilter, the reconstructed signal may be despaired, distorted. Anotherdifficulty is the selection of an appropriate filter for deblockingfiltering. Typically, the decision is made between several low passfilters with different frequency responses resulting in strong or weaklow pass filtering. In order to decide whether deblocking filtering isto be applied and to select an appropriate filter, image data in theproximity of the boundary of two blocks are considered.

For instance, H.264/MPEG-4 AVC evaluates the absolute values of thefirst derivation (derivative) in each of the two neighboring blocks, theboundary of which is to be deblocked. In addition, absolute values ofthe first derivative across the edge between the two blocks areevaluated, as described, for instance in H.264/MPEG-4 AVC standard,Section 8.7.2.2. HEVC employs a similar mechanism, however, uses also asecond derivative.

A deblocking filter may decide for each sample at a block boundarywhether it is to be filtered or not and with which filter or filtertype. When it is decided that a filter is to be applied, then a low passfilter is applied to smooth across the block boundary. The aim of thedecision whether to filter or not is to filter only those samples, forwhich the large signal change at the block boundary results from thequantization applied in the block-wise processing as described in thebackground art section above. The result of the deblocking filtering isa smoothed signal at the block boundary. The smoothed signal is lessannoying to the viewer than a blocking artifact. Those samples, forwhich the large signal change at the block boundary belongs to theoriginal signal to be coded, should not be filtered in order to keephigh frequencies and thus the visual sharpness. In the case of wrongdecisions, the image is either unnecessarily smoothened or remainsblocky. The deblocking filtering is performed across the vertical edgesof the block (horizontal filtering) and across the horizontal edges of ablock (vertical filtering).

FIG. 4A illustrates decision on a vertical boundary (to filter or not tofilter with a horizontal deblocking filter) and FIG. 4B illustratesdecision on a horizontal boundary (to filter or not with a verticaldeblocking filter). In particular, FIG. 4A shows a current block 440 tobe decoded and its already decoded neighboring blocks 410, 420, and 430.For the pixels 460 in a line, the decision is performed. Similarly, FIG.4B shows the same current block 440 and decision performed for thepixels 470 in a column.

The judgment on whether to apply the deblocking filter may be performedas follows, similarly to H.264/MPEG-4 AVC. Let us take a line of sixpixels 460, the first three pixels p2, p1, p0 of which belong to a leftneighboring block A 430 and the following three pixels q0, q1, and q2 ofwhich belong to the current block B 440 as also illustrated in FIG. 4A.Line 510 illustrates a boundary between the blocks A and B. Pixels p0and q0 are the pixels of the left neighbor A and of the current block B,respectively, located directly adjacent to each other. Pixels p0 and q0are filtered by the deblocking filtered for instance, when the followingconditions are fulfilled:

|p ₀ −q ₀|<α_(H264)(QP _(New)),

|p ₁ −p ₀|<β_(H264)(QP _(New)), and

|q ₁ −q ₀|<β_(H264)(QP _(New)),

wherein, in general, β_(H264)(QP_(New))<α_(H264)(QP_(New)). Theseconditions aim at detecting whether the difference between p0 and q0stems from blocking artifacts. They correspond to evaluation of thefirst derivation within each of the blocks A and B and between them.

Pixel p1 is filtered if, in addition to the above three conditions, alsothe following condition is fulfilled:

|p ₂ −p ₀|<β_(H264)(QP _(New)).

Pixel q1 is filtered, for instance, if in addition to the above firstthree conditions also the following condition is fulfilled:

|q ₂ −q ₀|<β_(H264)(QP _(New))

These conditions correspond to a first derivation within the first blockand a first derivation within the second block, respectively. In theabove conditions, QP denotes quantization parameter indicating theamount of quantization applied, and β,α are scalar constants. Inparticular, QP_(New) is quantization parameter derived based onquantization parameters QP_(A) and QP_(B) applied to the respectivefirst and second block A and B as follows:

QP _(New)=(QP _(A) +QP _(B)+1)>>1

wherein “>>1” denoted right shift by one bit.

The decision may be performed only for selected line or lines of ablock, while the filtering of pixels accordingly is then performed forall lines 460. An example 520 of lines 530 involved in decision incompliance with HEVC is illustrated in FIG. 5. Based on lines 530, thedecision whether to filter entire block is carried out.

Another example of deblocking filtering in HEVC can be found inJCTVC-E603 document, Section 8.6.1, of JTC-VC, of ITU-T SG16 WP3 andISO/IEC JTC1/SC29/WG11, freely available underhttp://phenix.int-evry.fr/jct/index.php/.

The two lines 530 are used to decide whether and how the deblockingfiltering is to be applied. The example 520 assumes the evaluating ofthe third (with index 2) and the sixth (with index 5) line for thepurpose of horizontally blocking filtering. In particular, the secondderivative within each of the blocks is evaluated resulting in theobtaining of measures d₂ and d₅ as follows:

d ₂ =|p2₂−2·p1₂ +p0₂ |+|q2₂−2·q1₂ +q0₂|,

d ₅ =|p2₅−2·p1₅ +p0₅ |+|q2₅−2·q1₅ +q0₅|.

The pixels p belong to block A and pixels q belong to block B. The firstnumber after p or q denotes column index and the following number insubscript denotes row number within the block. The deblocking for alleight lines illustrated in the example 520 is enabled when the followingcondition is fulfilled:

d=d ₂ +d ₅<β(QP _(Frame)).

If the above condition is not fulfilled, no deblocking is applied. Inthe case that deblocking is enabled, the filter to be used fordeblocking is determined. This determination is based on the evaluationof the first derivative between the blocks A and B. In particular, foreach line i, wherein i is an integer between 0 and 7, it is decidedwhether a strong or a weak low pass filter is to be applied. A strongfilter is elected if the following condition is fulfilled.

|p3_(i) −p0_(i) |+|q3_(i) −q0_(i)|<(β(QP _(Frame))>>3)

d<(β(QP _(FRAME))>>2)

|p0_(i) −q0_(i)|<((t _(c)(QP _(Frame))·5+1)>>1).

In compliance with the HEVC model “the strong filter” filters p2_(i),p1_(i), p0_(i), q0_(i), q1_(i), q2_(i) using p3_(i), p2_(i), p0_(i),q0_(i), q2_(i), q3_(i), samples whereas a “weak filter” filters samplesp1_(i), p0_(i), q0_(i), q1_(i) using p2_(i), p1_(i), p0_(i), q0_(i),q1_(i), q2_(i). In the above conditions, parameters β and t_(c) are bothfunctions of the quantization parameter QP_(Frame) which may be set fora slice of the image or the like. The values of β and t_(c) aretypically derived based on QP_(Frame) using lookup tables.

It is noted that strong filtering is only beneficial for very flatsignals. Otherwise, a rather week low pass filtering is of advantage.

The pixels involved in the strong low pass filtering according toconventional hybrid coding are illustrated in FIG. 6A. In particular,FIG. 6A shows samples which are used for filtering. These samplescorrespond to respective four adjacent pixels left and right to theborder between block A and B. These samples are used for filtering whichmeans that their values are input to the filtering processing. FIG. 6Afurther shows samples which are modified by the filter. These are thethree adjacent respective pixel values closest to the border between theblock A and B to its right and to its left. These values are modified bythe filter, i.e. they are smoothed. In particular, in the following, thevalues of the modified samples p0′_(i), p1′_(i), p2′_(i), q0′_(i),q1′_(i), and q2′_(i) of line with index i are listed.

p0_(i)′=Clip((p2_(i)+2·p1_(i)+2·p0_(i)+2·q0_(i) +q2_(i)+4)>>3)

p1_(i)′=Clip((p2_(i) +p1_(i) +p0_(i) +q0_(i)+2)>>2)

p2_(i)′=Clip((2·p3_(i)+3·p2_(i) +p1_(i) +p0_(i) +q0_(i)+4)>>3)

q0_(i)′=Clip((q2_(i)+2·q1_(i)+2·q0_(i)+2·p0_(i) +p2_(i)+4)>>3)

q1_(i)′=Clip((q2_(i) +q1_(i) +q0_(i) +p0_(i)+2)>>2)

q2_(i)′=Clip((2·q3_(i)+3·q2_(i) +q1_(i) +q0_(i) +p0_(i)+4)>>3)

The function Clip(x) is defined as follows:

${{Clip}(x)} = \{ \begin{matrix}0 & ; & {x < 0} \\{{max\_ allowed}{\_ value}} & ; & {x > {{max\_ allowed}{\_ value}}} \\x & ; & {else}\end{matrix} $

Hereby, max_allowed_value is a maximum value, which x can have. In thecase of PCM coding with k bit samples, the maximum value would bemax_allowed_value=2^(k)−1. For instance, in the case of PCM coding with8 bit samples, the maximum value would be max_allowed_value=255. In thecase of PCM coding with 10 bit samples, the maximum value would bemax_allowed_value=1023.

The above equations thus describe the process of strong filtering to beapplied. As can be seen from the above equations, pixels p3_(i) andq3_(i) of the row i are used in the equations, i.e. in the filtering,but they are not modified, i.e. filtered.

FIG. 6B illustrates application of a weak deblocking filter. Inparticular, samples used for filtering are shown on the left side andsamples modified by filtering are shown on the right side. For the weakfilter operations only the respective two adjacent pixels on the borderbetween blocks A and B are filtered while respective three adjacentpixels in each of blocks A and B on their border are used. Two decisionsare made for the purpose of the weak filtering. The first decisionrelates to whether a weak filter is to be applied at all or not for aparticular line. This decision is based on value A which is calculatedas follows

Δ=(9·(q0_(i) −p0_(i))−3·(q1_(i) −p1_(i))+8)>>4

Based on the calculated Δ the filtering is only applied if |Δ|<10·t_(c).Otherwise the filtering is not applied to the two pixels p0′_(i) andq0′_(i) lying on the boundary of the respective blocks A and B.

If the filtering is to be applied, it is performed as follows:

p0_(i)′=Clip(p0_(i)+Δ₁)

q0_(i)′=Clip(q0_(i)−Δ₁)

wherein Δ₁=Clip3(−t_(c),t_(c),Δ)

The function Clip(x) is defined as above. The function Clip3(x) isdefined as follows:

${{Clip}\; 3( {x,a,b} )} = \{ \begin{matrix}a & ; & {x < a} \\b & ; & {x > b} \\x & ; & {else}\end{matrix} $

When it is decided that the filtering is going to be applied and pixelsp0′_(i) and p0′_(i) had been filtered it is further decided whetherpixels p1′_(i) and p1′_(i) are to be filtered.

Pixel p1′_(i) is filtered only if d_(p)>(β/6) and correspondingly pixelq1′_(i) is filtered, only if d_(q)<(β/6). The filtering of these pixelsis performed as follows

p1_(i)′=Clip(p1_(i)+Δ_(2p))

q1_(i)′=Clip(q1_(i)+Δ_(2q))

with

Δ_(2p)=Clip3(−t _(c2) ,t _(c2),(((p2_(i) +p0_(i)+1)>>1)−p1_(i)+Δ₁)>>1)

Δ_(2q)=Clip3(−t _(c2) ,t _(c2),(((q2_(i) +q0_(i)+1)>>1)−q1_(i)−Δ₁)>>1)

and t_(c2)=t_(c)>>1.

The above description of the decision and selection of the deblockingfilter is typically employed for the luminance samples.

For the deblocking filtering of the chrominance, the following approachis used. The Delta value is calculated as follows:

Δ=(((q0_(i) −p0_(i))<<2)+p1_(i) −q1_(i)+4)>>3.

Based on the Delta value, the Delta1 value is calculated and useddirectly for the deblocking filtering as follows:

Δ₁=Clip3(−t _(c) ,t _(c),Δ), and

p0_(i)′=Clip(p0_(i)+Δ₁), q0_(i)′=Clip(q0_(i)−Δ₁).

As can be seen from the above procedure of the weak filtering operation,value Δ may be involved in several decision and filtering steps. Inparticular, the Δ is involved:

-   -   in the decision (luma) of whether a weak filter has to be        applied or not for a particular line,    -   in the (weak) filtering of pixels p0′_(i) and q0′_(i), and    -   over involvement of value Δ₁ also in the filtering of pixels        p1′_(i) and q1′_(i).

It is thus advantageous to calculate the value of A as accurately aspossible.

Given these problems with the existing technology, it would beadvantageous to provide an efficient deblocking filtering approach toseparately control the parameters for filtering.

The particular approach of the present disclosure is to controlseparately the strong and weak filtering.

This is achieved by the features of the independent claims. Advantageousembodiments are subject matter of the dependent claims.

Embodiment 1

As shown above, the Delta (Δ) value is implemented by a shift operationas:

Δ=(9·(q0_(i) −p0_(i))−3·(q1_(i) −p1_(i))+8)>>4.

The shift operation can be interpreted as a quantization of the Deltavalue (to achieve an integer division) and corresponds to the followingunquantized Delta value:

$\Delta_{k} = {\frac{{9 \cdot ( {{q\; 0_{i}} - {p\; 0_{i}}} )} - {3 \cdot ( {{q\; 1_{i}} - {p\; l_{i}}} )}}{16}.}$

Accordingly, the division by 16 is implemented by right shift (“>>”) byfour bits. The shift operation not only introduces inaccuracy by meansof the quantization but also causes the resulting quantized Delta valuesto have an offset with respect to the zero mean.

FIG. 7 illustrates the partial results of the rounding operation usingthe shift by four bits. The first column of the table in FIG. 7 showsexample values of a variable i ranging from −20 to +20. The secondcolumn lists the corresponding values i after the addition of offsetvalue 8. Finally, the third column shows shift by four corresponding tointeger division by 16 of the term i+8. As can be seen from the table,the distribution of the resulting values in the third column isasymmetric and has a non zero mean even when i had a zero-mean.

This results in an asymmetric quantizer characteristic as shown in FIG.8. Even when the unquantized Delta values have a typical symmetricprobability distribution, after the quantization as shown above anoffset is generated and

E[Δ]−E[Δ _(k)]≠0.

The Delta value is calculated in order to perform deblocking filteringprocess. This Delta value is generated as a weighted sum of samplevalues at the boundary between the two adjacent blocks to which aconstant offset is added. The constant is equal to eight in thisexample. The so obtained result is subsequently shifted by one or morebits to the right in order to clip the result. For symmetricallydistributed weighted sums of sample values, the resulting Delta has beenintroduced an offset, i.e. its expected value is unequal to zero.

In order to overcome this problem, in accordance with the presentdisclosure different constants are added before the right shift of theweighted sum of sample values. The different constants are selected insuch a way that the expected value of the Delta is zero. In particular,the quantization of the Delta value may be performed as:

$\Delta = \{ \begin{matrix}{( {{9 \cdot ( {{q\; 0_{i}} - {p\; 0_{i}}} )} - {3 \cdot ( {{q\; 1_{i}} - {p\; 1_{i}}} )} + a} )\operatorname{>>}4} & ; & {\Delta_{k} \geq 0} \\{( {{9 \cdot ( {{q\; 0_{i}} - {p\; 0_{i}}} )} - {3 \cdot ( {{q\; 1_{i}} - {p\; 1_{1}}} )} + b} )\operatorname{>>}4} & ; & {\Delta_{k} < 0}\end{matrix} $

Values a and b are then selected so as to result in a zero meandistribution of the Delta value.

For instance, according to a first example, a is equal to seven (a=7)and b is equal to eight (b=8). The resulting characteristic of the thussymmetric quantizer for a=7 and b=8 is shown in FIG. 9A. In the casethat this probability distribution of the unquantized Delta issymmetric, the quantizer generates no additional offset and:

E[Δ]−E[Δ _(k)]≠0.

However, the present disclosure is not limited by the particular valuesof parameters a and b. Constants a and b may be selected arbitrarily insuch a way that the distribution of the quantized Delta is zero mean.For instance, in accordance with the second example, constant a is equalto six (a=6) and constant b is equal to nine (b=9). The correspondingquantizer is shown in FIG. 9B. Compared to the quantizer of FIG. 9A,this quantizer has a dead zone larger than the quantizer of FIG. 9A.Thus, by selecting parameters a and b, the dead zone of the quantizermay be controlled. Similarly to the example of FIG. 9A, the mean valueof the quantized Delta has no offset with respect to the mean value ofthe Delta before quantization.

It is beneficial to select values a=6 and b=9 or a=7 and b=8, whenshifting by four bits (“>>4”) is used, which is usually employed forluminance samples. On the other hand, when shifting by three bits(“>>3”) is employed, the values of a=2 and b=5 are advantageous. A shiftof 3 bits right is typically employed for deblocking of chrominancesamples. For shifting by a single bit (“>>1”), values of a=0 and b=1 mayadvantageously be employed.

As can be seen from the above equation, for symmetric quantization ofDelta values, one additional “if” operation is necessary to quantize theDelta values accordingly. Namely, it is to be distinguished betweenΔ_(k) smaller or greater than zero. This may increase the computationalexpenses. In order to efficiently implement the symmetric quantizationof the Delta value as described above, this quantization may be combinedwith the subsequent clipping operation. In the following, a pseudo codefor implementing Delta calculation and the subsequent comparison of theso calculated Delta with the threshold t_(c) is exemplified.

  delta1 = (9*(q0−p0) −3*(q1−p1)+8)>>4 if (delta1>tc) {  delta1=tc; }else if (delta1<−tc) {  delta1=−tc; }

In this implementation, two comparisons with a non-zero value areperformed. Both are to be executed at each run of the code.Alternatively, the following pseudo-code may implement the samefunctionality:

  delta1 = (9*(q0−p0) −3*(q1−p1)+8)>>4 if (delta1>0) {  if (delta1>tc) {   delta1=tc;  } } else {  if (delta1<−tc)  {   delta1=−tc;  } }

In this case, one comparison with zero (sign comparison) is performedand then only one of the two comparisons with a non-zero number (sincethe two comparisons with non-zero number are now alternative).

In accordance with an embodiment of the present disclosure, thecalculation of the Delta as well as the subsequent comparison with thethreshold t_(c) for implementing the clipping, may be realized asfollows:

  delta = 9*(q0−p0) −3*(q1−p1) if (delta>0) {  delta1=(delta+a)>>4;  if(delta1>tc)  {   delta1=tc;  } } else {  delta1=(delta+b)>>4;  if(delta1<−tc)  {   delta1=−tc;  } }

As can be seen from the above pseudo-code, no additional operation isnecessary when compared to the above codes. Only a single comparisonwith zero is necessary and only a single one of the two comparisons witha non-zero value shall further be executed when run.

FIG. 10 illustrates a flow chart of a method according to an embodimentof the present disclosure. For each line of a block 1010 a decisionparameter is calculated. This is performed by calculating 1020 aweighted sum of adjacent samples at the boundary between a current blockand its neighboring block, wherein the samples form a line of samples.The line of samples may be a column or a row of the block. The samplesare, for instance, as shown above pixels p0_(i), q0_(i), p1_(i), andq1_(i). In this case, the samples form a row of the block in order todeblock the vertical boundary. However, the present disclosure isequally applicable for deblocking filtering of horizontal boundaries, inwhich case the pixels to be filtered or used for filtering form acolumn. After calculating the weighted sum 1020, an offset is determined1030. The value of the offset depends on the value of the weighted sum.The offset is added 1040 to the weighted sum. The so obtained offsetweighted sum is then shifted 1050 to the right by a predetermined numberof bits. This shifting implements an integer division. This may beperformed differently for luminance and chrominance samples.

The decision parameter corresponds to the shifted and offset weightedsum. The decision parameter may further be used to judge 1060 whether adeblocking filter is to be applied to a sample of the current block atthe boundary. If 1070 it is judged that deblocking filtering is to beapplied (“yes” in step 1270), the line is deblocked 1280, i.e. thesample of the current block at the boundary (e.g. p0′_(i)) is filtered.Otherwise (“no” in step 1270), the deblocking filtering is not appliedto this sample and/or the entire line. However, it is noted that thedecision process is not necessarily to be performed. It may beadvantageous to perform the decision process based on the decisionparameter calculated only for the luminance samples. For the chrominancesamples, the decision whether deblocking filter is to be applied or notmay be skipped and it may be directly filtered. However, the presentdisclosure is also not limited to the above described different handlinkof luminance and chrominance and, in general, the decision process doesnot need to be performed at all, rather a filter selection and/orfiltering may be performed based on the decision parameter. Therefore,the decision parameter may also be called “sample modificationparameter”, since it may be used to modify (filter) the sample.

In accordance with an embodiment of the present disclosure, the offsettakes a first value when the weighted sum is positive and takes a secondvalue different from the first value when the weighted sum is negative.If the weighted sum has a value of 0, it may be further defined whetherthe first, the second or a first value is taken. The first and thesecond value are advantageously determined in such a way that the meanof the weighted sum is equal to the mean of the decision parameter. Inthis way, no shift in the mean value is artificially introduced by theoperation of integer division implemented as right shift.

Advantageously, when the predetermined number of bits is 4, the firstvalue is 6 and the second value is 9 or the first value is 7 and thesecond value is 8. Alternatively, when the predetermined number of bitsis 3, the first value is 2 and the second value is 5. Still morealternatively, when the predetermined number is 1, the first value maybe 0 and the second value may be 1. It is noted that the above valuesmay be exchanged, i.e. the first value would be the second value and thesecond value would be the first value. The predetermined value (numberof bits to be shifted) with size 4 is typically employed for deblockingfiltering of the luminance samples. Also the shift value of 1 bit istypically employed for filtering the luminance. On the other hand, thepredetermined value used for shifting by 3 bits is typically employedfor filtering the chrominance part of the image.

In accordance with an advantageous embodiment of the present disclosure,the method further includes calculating a filtering parameter byclipping the absolute value of the decision parameter to a clippingvalue. The filtering parameter is used for filtering the sample at theboundary of the current block. In particular, the filtering is performedby adding the filtering parameter to the sample and the result may beclipped. In order to simplify the implementation and reduce thecomputational costs, the decision and the filtering parameters may becalculated by the following steps:

Firstly, the weighted sum of the pixel values in the line is calculated.When the weighted sum is greater than 0, the weighted sum is offset bythe first value and shifted by the predetermined number of bits toobtain the decision parameter. When the decision parameter is largerthan the clipping value, the filtering parameter is obtained by clippingthe decision parameter to the clipping value, otherwise the filteringparameter is equal to the decision parameter.

When, on the other hand, the weighted sum, is not greater than 0, theweighted sum is offset by the second value and shifted by thepredetermined number of bits to obtain the decision parameter. When thedecision parameter is smaller than the negative clipping value, thefiltering parameter is obtained by clipping the decision parameter tothe negative clipping value, otherwise the filtering parameter is equalto the decision parameter. In the above, it is assumed that the clippingvalue is a positive integer.

As shown above, when performing the deblocking filtering, the efficiencyloss and/or loss of quality may be caused by integer implementation andadditional quantization errors may thus be introduced by the deblockingoperations.

In accordance with another aspect of the present disclosure, in additionto adjusting the subjective quality by controlling the ratio betweenstrong, weak or no filtering, maximum allowed modification by thedeblocking filter is controlled. This enables adjustment of theobjective quality by limiting the quantization errors introduced by thedeblocking. Accordingly, the objective quality can be adjustedindependently of the subjective quality, and thus in an optimal way. Inparticular, in HM4.0, the threshold value t_(c) is determined asfollows:

i_(tc) = Clip 3(0, QP_(Max) + 4, QP + tc_(offset))t_(c) = tctable[i_(tc)] ⋅ bitdepthscale wherein${{Clip}\; 3( {a,b,x} )} = \{ {{\begin{matrix}a & ; & {x < a} \\b & ; & {x > b} \\x & ; & {else}\end{matrix}{tc}_{offset}} = \{ \begin{matrix}2 & ; & {{BS} > 0} \\0 & ; & {else}\end{matrix} } $

Parameter QP_(max) indicates the maximum possible QP value, which istypically 51, resulting in upper clipping threshold QP_(max)+4 of 55.The parameter “bitdepthscale” is a scaling factor which depends on thebit depth of samples to be deblocked. For instance, the internal bitdepth may be 10 while the input signal has a bit depth of 8. ParameterBS indicates “boundary strength” and its value typically differs forintra and inter prediction. For instance, for intra prediction it maytake values 2 or 3 and for the inter prediction, it may be 0, 1, or 2.

The tctable is a field of possible values, for instance:

  Const UChar tctable_8X8 [56] = {  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1,  1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4,4, 4, 5, 5, 6, 6, 7, 8, 9, 9,  10, 10, 11, 11, 12, 12, 13, 13, 14, 14 };

Similarly the threshold β is determined as follows:

i _(β)=Clip3(0,QP _(Max) ,QP),

β=betatable[i _(β)]·bitdepthscale,

with the “betatable” defined, for instance, as

  Const UChar betatable_8X8 [52] = {  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 11,  12, 13, 14, 15, 16, 17, 18, 20, 22,24, 26, 28, 30, 32, 34, 36,  38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,60, 62, 64 };

The contribution JCTVC-F143, “CE12: Deblocking filter parameteradjustment in slice level” suggests determining the threshold valuet_(c) by using an additional offset coded within the slice header asfollows:

i _(tc)=Clip3(0,QP _(Max)+4,QP+tc _(offset) +tc _(offset,coded))

t _(c) =tctable[i _(tc)]·bitdepthscale

wherein tctable remains same as above.

Similarly, the contribution JCTVC-F143 suggests adding additional offsetcoded in the slice header to the calculation of the threshold value β asfollows:

i _(β)=Clip3(0,QP _(Max) ,QP+β _(offset,coded))

β=betatable[i _(β)]·bitdepthscale

The additional offset according to JCTVC-F143 affects the enabling ordisabling of deblocking for an entire block. In particular, the block isfiltered only when:

d=d _(q) +d _(p)<β

as already described in the background section above. When thedeblocking filtering is enabled, the parameter β is further used toadjust the ratio between strong and weak filtering. It is used to decidefor each individual line or column whether a weak or a strong filter isto be applied and whether the second boundary-closest pixel (p1, q1) isto be deblocked or not. However, there is no effect on the strongfiltering operation itself.

The threshold t_(c) is used in the performing of the decision whether aweak filter is to be applied or not. Moreover, parameter t_(c) isfurther used in the calculation of parameter Delta1 and in the actualfiltering of samples p0′_(i) and q0′_(i), as shown above. The parametert_(c) further adjusts maximum modification by the deblocking filter (cf.clip3 values a, b in the filtering operations described in thebackground section).

In accordance with an embodiment of the present disclosure, thedeblocking filtering is further finer controlled by the high-levelparameters which may be transmitted at the picture, slice or sequencelevel. In particular, the deblocking filtering is controlled (as shownin the background section) by the parameter t_(c) and by the parameterbeta. These parameters are used to determine the strength of filteringand/or decide whether the filtering is to be applied. It has directinfluence also to the clipping during the filter application. Thedecision whether weak/strong filtering is to be applied influencesmostly the subjective image quality. In contrast, the influence onclipping operation regards mainly the objective quality. The presentdisclosure enables separate controlling the objective and subjectivequality related stages of deblocking filtering separately.

Accordingly, the threshold t_(c) differs for different stages of thedeblocking decision and filtering operations by different offset whichmay be provided (embedded) in the slice header. In particular, a firstthreshold value t_(c1) may be calculated as follows:

i _(tc1)=Clip3(0,QP _(Max)+4,QP+tc _(offset) +tc _(offset,coded))

t _(c1) =tctable[i _(tc1)]·bitdepthscale

A second threshold t_(c2) may be defined as:

i _(tc2)=Clip3(0,QP _(Max)+4,QP+tc _(offset) +tc _(offset2,coded))

t _(c2) =tctable[i _(tc2)]·bitdepthscale

In other words, a first parameter t_(c1) is obtained based on thequantization parameter (QP) offset by a calculated offset (tc_(offset))and by a first value signalled in the bitstream (tc_(offset, coded)). Asecond parameter t_(c2) is obtained based on the quantization parameteroffset (QP) by the calculated offset (tc_(offset)) and by a second valuesignalled in the bitstream (tc_(offset2, coded)).

The two different threshold values t_(c1) and t_(c2) are employed in theprocedure of deblocking filter decisions and selection as follows. Thedecision on whether a deblocking filter is to be applied for the entireblock of 8×8 pixels may be performed, as shown above for the state ofthe art. The decision on whether a strong or a weak deblocking filter isto be applied for a particular line or a column of pixels is performedbased on the first threshold value t_(c1). In particular, a strongfilter is applied if

|p3_(i) −p0_(i) |+|q3_(i) −q0_(i)|<(β>>3)

d<(β>>2)

|p0_(i) −q0_(i)|<((t _(c1)·5+1)>>1)

In all other cases, a weak deblocking filter is applied.

Accordingly, the first parameter (threshold) t_(c1) is used to controlthe subjective quality, namely, the (decision between) application ofweak or strong filtering.

The value of Delta is calculated in a similar way, as shown in thebackground of the disclosure, namely as

Δ=(9·(q0_(i) −p0_(i))−3·(q1_(i) −p1_(i))+8)>>4

The decision on whether a weak filter operation should be performed atall or not may also be performed based on the first threshold valuet_(c1). In particular, the filtering is only applied if

|Δ|<10·t _(c1)

Otherwise, no filtering is applied for the line i. In case it is decidedto apply a weak deblocking filter, the pixels on the block boundaryp0′_(i) and q0′_(i) are filtered. According to this embodiment of thepresent disclosure, the second value of the threshold t_(c2) is used forperforming the filtering. The filtering may be performed as follows:

p0_(i)′=Clip(p0_(i)+Δ₁), and/or q0_(i)′=Clip(q0_(i)+Δ₁).

After filtering of the pixels at the boundary of the two blocks A and B,it may be decided whether filtering should also be applied to the secondnearest pixels p1′_(i) and q1′_(i) from the boundary of the respectiveblocks A and B. In particular, these two pixels are filtered only if

d _(p)<(β/6) and d _(q)<(β/6)

respectively.

If it is decided to filter pixel p1′_(i) then it is filtered by usingthe second threshold value t_(c2) since the second threshold valuecontrols the filtering operations and has influence on the objectivequality by having an effect on the clopping. The filtering may beperformed as follows

Δ_(2p)=Clip3(−(t _(c2)>>1),(t _(c2)>>1),(((p2_(i)+p0_(i)+1)>>1)−p1_(i)+Δ₁)>>1)

p1_(i)′=Clip(p1_(i)+Δ_(2p))

Similarly, if it is decided that the pixel q1′_(i) is to be filtered,then the filtering may be performed as:

Δ_(2q)=Clip3(−(t _(c2)>>1),(t _(c2)>>1),(((q2_(i)+q0_(i)+1)>>1)−q1_(i)−Δ₁)>>1)

q1_(i)′=Clip(q1_(i)+Δ_(2q))

Accordingly, the second parameter (threshold) t_(c2) is used infiltering operation. In particular, the second parameter controls themaximum (upper) and minimum (lower) clipping values (a, b, of the clip3operation as shown above). Parameters t_(c2) and t_(c1) are determinedindependently from each other and separately and may thus differ invalue as shown above.

Advantageously; the strong filtering also depends on a threshold valuet_(c3) as shown below:

p0_(i)′=Clip(p0_(i)+Clip3(−t _(c3) ,t_(c3),(p2_(i)+2·p1_(i)−6·p0_(i)+2·q0_(i) +q2_(i)+4)>>3))

p1_(i)′=Clip(p1_(i)+Clip3(−t _(c3) ,t _(c3),(p2_(i)−3·p1+p0_(i)+q0_(i)+2)>>2))

p2_(i)′=Clip(p2_(i)+Clip3(−t _(c3) ,t _(c3),(2·p3_(i)−5·p2_(i) +p1_(i)+p0_(i) +q0_(i)+4)>>3))

q0_(i)′=Clip(q0_(i)+Clip3(−t _(c3) ,t_(c3),(q2_(i)+2·q1_(i)−6·q0_(i)+2·p0_(i) +p2_(i)+4)>>3))

q1_(i)′=Clip(q1_(i)Clip3(−t _(c3) ,t _(c3),(q2_(i)−3·q1_(i) +q0_(i)+p0_(i)+2)>>2))

q2_(i)′=Clip(q2_(i)+Clip3(−t _(c3) ,t _(c3),(2·q3_(i)−5·q2_(i) +q1_(i)+q0_(i) +p0_(i)+4)>>3))

The third parameter t_(c3) controls thus filtering operation of the“strong filter”, i.e. filter applied to three boundary-nearest samples(pixels) in the block. In particular, the filtering is controlled bysetting the upper and lower clipping threshold (−tc3, tc3) whencalculating the offset added to the filtered sample. This offset iscalculated as a weighted sum of surrounding pixels in block A and Boffset by a predetermined value and shifted by a predetermined number ofbits.

The third threshold value t_(c3) may be equal to the threshold valuet_(c2). Both thresholds control the objective quality by directlyimpacting the filtering operation. However, the third value t_(c3) mayalso be determined independently from the threshold values t_(c1) andt_(c2), coded and embedded into the bit stream at the slice level or atanother level such as frame level, block level or each of severalframes.

The employing of different thresholds t_(c1) and t_(c2) provides theadvantage of increased coding efficiency. These thresholds may be ratedistortion optimized by the use of tc_(offset,coded) andtc_(offset2,coded).

FIG. 11 illustrates the increased coding efficiency when two thresholdsare applied in accordance with an embodiment of the present disclosurecompared to the coding efficiency of the HM4.0 and JCTVC-F143. Thisfigure illustrates the peak signal to noise ratio in dB as a function ofthe data rate. In order to get these results, video sequence“basketball-pass” has been compressed by using quantization parameterwith value QP=37 with a prediction structure of low delay and highefficiency. The coding efficiency of the disclosure has been evaluatedfor an intra-only configuration, i.e. spatial prediction, based on thecoding conditions commonly used in the standardization activities of theISO and the ITU, see document JCTVC-E700(http://phenix.int-evry.fr/jct/doc_end_user/current_document.php?id=2454). As can be seen in FIG. 11, the suggestion of JCTVC-F143decreases the coding efficiency by adjusting the subjective qualityusing the tc_(offset),coded=−5 and β_(offset,coded)=−2. The abovedescribed embodiment of the present disclosure enables maintaining thesubjective quality, since the first parameter tc1 is set separately fromtc2 and may be individually configured. At the same time, the objectiveimage quality is increased by the independent parameter tc2. Theparameters tc1 and tc2 differ, as described above, by a configurableoffset added before clipping. By using two different offsets obtained bya rate-distortion optimization, the embodiment of the present disclosurethus provides an increased coding efficiency.

The present disclosure is not limited to the example as presented above.In general, individual parameters may be used for each decisionoperation (decision on whether to apply or not a filter or which filterto apply to particular sample, line, or block) and for each filteringoperation.

Individual parameter values enable more flexible adaptation to the imagecontent and characteristics and may lead to a higher coding efficiency.In order to reduce the overhead caused by signalling of the separate andindividual parameters used in decision and application of the deblockingfiltering, the parameters may be further coded by differential coding orby employing an advantageous entropy coding. For instance, the firstoffset tc_(offset, coded) may be coded explicitly and the remainingoffset values (tc_(offset, coded2) or possibly tc_(offset, coded3) whichmay be used for calculating tc3 threshold, or any other additionaloffsets) are coded as a difference to the first offset or as mutualdifferences.

Alternatively, the threshold value t_(c) may be determined as follows:

i _(tc)=Clip3(0,QP _(Max)+4,QP+tc _(offset))

t _(c)=(tctable[i _(tc) ]+tc _(offset,coded))·bitdepthscale

Accordingly, an additional offset is added to the value of the tctabledirectly. This offset may be coded and transmitted within the sliceheader. Similarly to the examples above, the table offset may bedetermined individually and separately for the filter decisions(strong/weak) and for the filtering operation (for instance, controllingthe clipping). This additional offset enables finer adjusting of thet_(c) value, since it also allows values higher than 14 when the examplevalues of tctable listed above are assumed.

In a similar way, a finer adaptation for the threshold value β may beperformed as follows:

i _(β)=Clip3(0,QP _(Max) ,QP),

β=(β_(offset,coded)+betatable[i _(β)])·bitdepthscale.

With this additional offset β_(offset,coded) finer adjusting may beachieved since also additional values such as β=55 are possible, whenthe example values of betatable listed above are assumed.

It is noted that the above examples are not to limit the presentdisclosure to this particular filtering stages. For instance, the aboveexamples were described mainly with regard to typical filtering ofluminance samples. However, the present disclosure is also applicable tofiltering as applied to chrominance samples, for instance, filteringwithout performing decision whether to filter a particular line of ablock or not. The idea of the above embodiment is to enable separatecontrolling of subjective and objective quality. In particular,high-level parameters are used to separately and individually controldecision on whether to apply or not a deblocking filter and thefiltering operation itself by controlling operations involved thereinsuch as clipping. This idea may be applied only to some of the abovedescribed stages. It is not limited to the particular filtering of HEVC,with help of which, the above examples were described.

In the following further embodiments of the disclosure are summarized: amethod for deblocking filtering of a sample in a current block of animage, the method comprising the steps of: determining a samplemodification parameter by: calculating a weighted sum of adjacentsamples at the boundary between a current block and its neighboringblock, the samples forming a line of samples, adding an offset to theweighted sum, and shifting the offset weighted sum right by apredetermined number of bits, wherein the value of the offset depends onthe value of the weighted sum; applying the deblocking filter to thesample including offset by the sample modification parameter.

Advantageously, the offset has a first value when the weighted sum ispositive and a second value, different from the first value when theweighted sum is negative; and the first and the second value aredetermined in such a way that the mean of the weighted sum equals to themean of the sample modification parameter shifted left by the saidpredetermined number of bits. In particular, the predetermined number ofbits is 4, the first value is 6 and the second value 9 or the firstvalue is 7 and the second value is 8; or the predetermined number ofbits is 3, the first value is 2 and the second value 5; or thepredetermined number of bits is 1, the first value is 0 and the secondvalue 1.

The method may further include calculating a filtering parameter byclipping the absolute value of the sample modification parameter to aclipping value; and filtering said sample including adding to it thefiltering parameter, wherein the sample modification and the filteringparameters are calculated by the following steps: calculating theweighted sum; when the weighted sum is greater than zero, the weightedsum is offset by the first value and shifted by the predetermined numberof bits to obtain the sample modification parameter; and when the samplemodification parameter is larger than the clipping value, the filteringparameter is obtained by clipping the sample modification parameter tothe clipping value, otherwise the filtering parameter equals to thesample modification parameter, when the weighted sum is not greater thanzero, the weighted sum is offset by the second value and shifted by thepredetermined number of bits to obtain the sample modificationparameter; and when the sample modification parameter is smaller thanthe negative clipping value, the filtering parameter is obtained byclipping the sample modification parameter to the negative clippingvalue, otherwise the filtering parameter equals to the samplemodification parameter.

The method may further include a step of judging whether a deblockingfilter is to be applied to the sample of the current block at theboundary based on the sample modification parameter; and/or applying ornot applying the deblocking filter to the sample according to thejudging result.

Another embodiment provides a method for deblocking filtering of asample in a current block of an image, the method comprising the stepsof: determining whether a deblocking filter is to be applied to a samplebased on comparing of a decision value with a predetermined thresholdvalue; filtering the sample including offsetting it with a samplemodification value; calculating the predetermined threshold and thesample modification value including adding an offset to a quantizationparameter associated with the sample, wherein the offset is determinedseparately for calculating the predetermined threshold and for thesample modification value.

Advantageously, the respective offset for calculating the predeterminedthreshold and the separate offset for calculating the samplemodification value are both included into the bitstream of the codedimage data.

Another embodiment provides an apparatus for deblocking filtering of asample in a current block of an image, the apparatus comprising: acalculation unit for determining a sample modification parameterincluding: a summing unit for calculating a weighted sum of adjacentsamples at the boundary between a current block and its neighboringblock, the samples forming a line of samples, an adder for adding anoffset to the weighted sum, and a shifting unit for shifting the offsetweighted sum right by a predetermined number of bits, wherein the valueof the offset depends on the value of the weighted sum; and a filteringunit for applying the deblocking filter to the sample includingoffsetting by the sample modification parameter.

Advantageously, the offset has a first value when the weighted sum ispositive and a second value, different from the first value when theweighted sum is negative; and the first and the second value aredetermined in such a way that the mean of the weighted sum equals to themean of the sample modification parameter shifted left by the saidpredetermined number of bits.

In particular, the predetermined number of bits is 4, the first value is6 and the second value 9 or the first value is 7 and the second value is8; or the predetermined number of bits is 3, the first value is 2 andthe second value 5; or the predetermined number of bits is 1, the firstvalue is 0 and the second value 1.

Advantageously, the calculation unit is configured to calculate afiltering parameter by clipping the absolute value of the samplemodification parameter to a clipping value; and filtering said sampleincluding adding to it the filtering parameter, wherein the calculationunit is configured to calculate the sample modification and thefiltering parameters as follows: calculating the weighted sum by thesumming unit; when the weighted sum is greater than zero, the adder isconfigured to offset the weighted sum by the first value and the shifteris configured to shift the result by the predetermined number of bits toobtain the sample modification parameter; and when the samplemodification parameter is larger than the clipping value, thecalculation unit is configured to calculate the filtering parameter byclipping the sample modification parameter to the clipping value,otherwise the filtering parameter equals to the sample modificationparameter, when the weighted sum is not greater than zero, the adder isconfigured to offset the weighted sum by the second value and theshifting unit is configured to shift the result by the predeterminednumber of bits to obtain the sample modification parameter; and when thesample modification parameter is smaller than the negative clippingvalue, the calculation unit is configured to obtain the filteringparameter by clipping the sample modification parameter to the negativeclipping value, otherwise the filtering parameter equals to the samplemodification parameter.

Moreover, the apparatus may further include a judging unit for judgingwhether a deblocking filter is to be applied to the sample of thecurrent block at the boundary based on the sample modificationparameter; and/or wherein the filtering unit is configured to apply ornot apply the deblocking filter to the sample according to the judgingresult.

Another embodiments provide an apparatus for deblocking filtering of asample in a current block of an image, the apparatus comprising: ajudging unit for determining whether a deblocking filter is to beapplied to a sample based on comparing of a decision value with apredetermined threshold value; a filtering unit for filtering the sampleincluding offsetting it with a sample modification value; a calculationunit for calculating the predetermined threshold and the samplemodification value including adding an offset to a quantizationparameter associated with the sample, wherein the offset is determinedseparately for calculating the predetermined threshold and for thesample modification value.

Advantageously, the respective offset for calculating the predeterminedthreshold and the separate offset for calculating the samplemodification value are both included into the bitstream of the codedimage data.

The processing described in each of embodiments can be simplyimplemented in an independent computer system, by recording, in arecording medium, a program for implementing the configurations of themoving picture coding method (image coding method) and the movingpicture decoding method (image decoding method) described in each ofembodiments. The recording media may be any recording media as long asthe program can be recorded, such as a magnetic disk, an optical disk, amagnetic optical disk, an IC card, and a semiconductor memory.

Hereinafter, the applications to the moving picture coding method (imagecoding method) and the moving picture decoding method (image decodingmethod) described in each of embodiments and systems using thereof willbe described. The system has a feature of having an image coding anddecoding apparatus that includes an image coding apparatus using theimage coding method and an image decoding apparatus using the imagedecoding method. Other configurations in the system can be changed asappropriate depending on the cases.

Embodiment 2

The processing described in each of embodiments can be simplyimplemented in an independent computer system, by recording, in arecording medium, one or more programs for implementing theconfigurations of the moving picture encoding method (image encodingmethod) and the moving picture decoding method (image decoding method)described in each of embodiments. The recording media may be anyrecording media as long as the program can be recorded, such as amagnetic disk, an optical disk, a magnetic optical disk, an IC card, anda semiconductor memory.

Hereinafter, the applications to the moving picture encoding method(image encoding method) and the moving picture decoding method (imagedecoding method) described in each of embodiments and systems usingthereof will be described. The system has a feature of having an imagecoding apparatus that includes an image encoding apparatus using theimage encoding method and an image decoding apparatus using the imagedecoding method. Other configurations in the system can be changed asappropriate depending on the cases.

FIG. 12 illustrates an overall configuration of a content providingsystem ex100 for implementing content distribution services. The areafor providing communication services is divided into cells of desiredsize, and base stations ex106, ex107, ex108, ex109, and ex110 which arefixed wireless stations are placed in each of the cells.

The content providing system ex100 is connected to devices, such as acomputer ex111, a personal digital assistant (PDA) ex112, a cameraex113, a cellular phone ex114 and a game machine ex115, via the Internetex101, an Internet service provider ex102, a telephone network ex104, aswell as the base stations ex106 to ex110, respectively.

However, the configuration of the content providing system ex100 is notlimited to the configuration shown in FIG. 12, and a combination inwhich any of the elements are connected is acceptable. In addition, eachdevice may be directly connected to the telephone network ex104, ratherthan via the base stations ex106 to ex110 which are the fixed wirelessstations. Furthermore, the devices may be interconnected to each othervia a short distance wireless communication and others.

The camera ex113, such as a digital video camera, is capable ofcapturing video. A camera ex116, such as a digital camera, is capable ofcapturing both still images and video. Furthermore, the cellular phoneex114 may be the one that meets any of the standards such as GlobalSystem for Mobile Communications (GSM) (registered trademark), CodeDivision Multiple Access (CDMA), Wideband-Code Division Multiple Access(W-CDMA), Long Term Evolution (LTE), and High Speed Packet Access(HSPA). Alternatively, the cellular phone ex114 may be a PersonalHandyphone System (PHS).

In the content providing system ex100, a streaming server ex103 isconnected to the camera ex113 and others via the telephone network ex104and the base station ex109, which enables distribution of images of alive show and others. In such a distribution, a content (for example,video of a music live show) captured by the user using the camera ex113is encoded as described above in each of embodiments (i.e., the camerafunctions as the image encoding apparatus according to an aspect of thepresent disclosure), and the encoded content is transmitted to thestreaming server ex103. On the other hand, the streaming server ex103carries out stream distribution of the transmitted content data to theclients upon their requests. The clients include the computer ex111, thePDA ex112, the camera ex113, the cellular phone ex114, and the gamemachine ex115 that are capable of decoding the above-mentioned encodeddata. Each of the devices that have received the distributed datadecodes and reproduces the encoded data (i.e., functions as the imagedecoding apparatus according to an aspect of the present disclosure).

The captured data may be encoded by the camera ex113 or the streamingserver ex103 that transmits the data, or the encoding processes may beshared between the camera ex113 and the streaming server ex103.Similarly, the distributed data may be decoded by the clients or thestreaming server ex103, or the decoding processes may be shared betweenthe clients and the streaming server ex103. Furthermore, the data of thestill images and video captured by not only the camera ex113 but alsothe camera ex116 may be transmitted to the streaming server ex103through the computer ex111. The encoding processes may be performed bythe camera ex116, the computer ex111, or the streaming server ex103, orshared among them.

Furthermore, the coding processes may be performed by an LSI ex500generally included in each of the computer ex111 and the devices. TheLSI ex500 may be configured of a single chip or a plurality of chips.Software for coding video may be integrated into some type of arecording medium (such as a CD-ROM, a flexible disk, and a hard disk)that is readable by the computer ex111 and others, and the codingprocesses may be performed using the software. Furthermore, when thecellular phone ex114 is equipped with a camera, the video data obtainedby the camera may be transmitted. The video data is data encoded by theLSI ex500 included in the cellular phone ex114.

Furthermore, the streaming server ex103 may be composed of servers andcomputers, and may decentralize data and process the decentralized data,record, or distribute data.

As described above, the clients may receive and reproduce the encodeddata in the content providing system ex100. In other words, the clientscan receive and decode information transmitted by the user, andreproduce the decoded data in real time in the content providing systemex100, so that the user who does not have any particular right andequipment can implement personal broadcasting.

Aside from the example of the content providing system ex100, at leastone of the moving picture coding apparatus (image coding apparatus)described in each of embodiments may be implemented in a digitalbroadcasting system ex200 illustrated in FIG. 13. More specifically, abroadcast station ex201 communicates or transmits, via radio waves to abroadcast satellite ex202, multiplexed data obtained by multiplexingaudio data and others onto video data. The video data is data encoded bythe moving picture encoding method described in each of embodiments(i.e., data encoded by the image encoding apparatus according to anaspect of the present disclosure). Upon receipt of the multiplexed data,the broadcast satellite ex202 transmits radio waves for broadcasting.Then, a home-use antenna ex204 with a satellite broadcast receptionfunction receives the radio waves. Next, a device such as a television(receiver) ex300 and a set top box (STB) ex217 decodes the receivedmultiplexed data, and reproduces the decoded data (i.e., functions asthe image decoding apparatus according to an aspect of the presentdisclosure).

Furthermore, a reader/recorder ex218 (i) reads and decodes themultiplexed data recorded on a recording medium ex215, such as a DVD anda BD, or (i) encodes video signals in the recording medium ex215, and insome cases, writes data obtained by multiplexing an audio signal on theencoded data. The reader/recorder ex218 can include the moving picturedecoding apparatus or the moving picture encoding apparatus as shown ineach of embodiments. In this case, the reproduced video signals aredisplayed on the monitor ex219, and can be reproduced by another deviceor system using the recording medium ex215 on which the multiplexed datais recorded. It is also possible to implement the moving picturedecoding apparatus in the set top box ex217 connected to the cable ex203for a cable television or to the antenna ex204 for satellite and/orterrestrial broadcasting, so as to display the video signals on themonitor ex219 of the television ex300. The moving picture decodingapparatus may be implemented not in the set top box but in thetelevision ex300.

FIG. 14 illustrates the television (receiver) ex300 that uses the movingpicture encoding method and the moving picture decoding method describedin each of embodiments. The television ex300 includes: a tuner ex301that obtains or provides multiplexed data obtained by multiplexing audiodata onto video data, through the antenna ex204 or the cable ex203, etc.that receives a broadcast; a modulation/demodulation unit ex302 thatdemodulates the received multiplexed data or modulates data intomultiplexed data to be supplied outside; and amultiplexing/demultiplexing unit ex303 that demultiplexes the modulatedmultiplexed data into video data and audio data, or multiplexes videodata and audio data encoded by a signal processing unit ex306 into data.

The television ex300 further includes: a signal processing unit ex306including an audio signal processing unit ex304 and a video signalprocessing unit ex305 that code each of audio data and video data,(which function as the image coding apparatus according to the aspectsof the present disclosure); and an output unit ex309 including a speakerex307 that provides the decoded audio signal, and a display unit ex308that displays the decoded video signal, such as a display. Furthermore,the television ex300 includes an interface unit ex317 including anoperation input unit ex312 that receives an input of a user operation.Furthermore, the television ex300 includes a control unit ex310 thatcontrols overall each constituent element of the television ex300, and apower supply circuit unit ex311 that supplies power to each of theelements. Other than the operation input unit ex312, the interface unitex317 may include: a bridge ex313 that is connected to an externaldevice, such as the reader/recorder ex218; a slot unit ex314 forenabling attachment of the recording medium ex216, such as an SD card; adriver ex315 to be connected to an external recording medium, such as ahard disk; and a modem ex316 to be connected to a telephone network.Here, the recording medium ex216 can electrically record informationusing a non-volatile/volatile semiconductor memory element for storage.The constituent elements of the television ex300 are connected to eachother through a synchronous bus.

First, the configuration in which the television ex300 decodesmultiplexed data obtained from outside through the antenna ex204 andothers and reproduces the decoded data will be described. In thetelevision ex300, upon a user operation through a remote controllerex220 and others, the multiplexing/demultiplexing unit ex303demultiplexes the multiplexed data demodulated by themodulation/demodulation unit ex302, under control of the control unitex310 including a CPU. Furthermore, the audio signal processing unitex304 decodes the demultiplexed audio data, and the video signalprocessing unit ex305 decodes the demultiplexed video data, using thedecoding method described in each of embodiments, in the televisionex300. The output unit ex309 provides the decoded video signal and audiosignal outside, respectively. When the output unit ex309 provides thevideo signal and the audio signal, the signals may be temporarily storedin buffers ex318 and ex319, and others so that the signals arereproduced in synchronization with each other. Furthermore, thetelevision ex300 may read multiplexed data not through a broadcast andothers but from the recording media ex215 and ex216, such as a magneticdisk, an optical disk, and a SD card. Next, a configuration in which thetelevision ex300 encodes an audio signal and a video signal, andtransmits the data outside or writes the data on a recording medium willbe described. In the television ex300, upon a user operation through theremote controller ex220 and others, the audio signal processing unitex304 encodes an audio signal, and the video signal processing unitex305 encodes a video signal, under control of the control unit ex310using the encoding method described in each of embodiments. Themultiplexing/demultiplexing unit ex303 multiplexes the encoded videosignal and audio signal, and provides the resulting signal outside. Whenthe multiplexing/demultiplexing unit ex303 multiplexes the video signaland the audio signal, the signals may be temporarily stored in thebuffers ex320 and ex321, and others so that the signals are reproducedin synchronization with each other. Here, the buffers ex318, ex319,ex320, and ex321 may be plural as illustrated, or at least one buffermay be shared in the television ex300. Furthermore, data may be storedin a buffer so that the system overflow and underflow may be avoidedbetween the modulation/demodulation unit ex302 and themultiplexing/demultiplexing unit ex303, for example.

Furthermore, the television ex300 may include a configuration forreceiving an AV input from a microphone or a camera other than theconfiguration for obtaining audio and video data from a broadcast or arecording medium, and may encode the obtained data. Although thetelevision ex300 can encode, multiplex, and provide outside data in thedescription, it may be capable of only receiving, decoding, andproviding outside data but not the encoding, multiplexing, and providingoutside data.

Furthermore, when the reader/recorder ex218 reads or writes multiplexeddata from or on a recording medium, one of the television ex300 and thereader/recorder ex218 may code the multiplexed data, and the televisionex300 and the reader/recorder ex218 may share the coding partly.

As an example, FIG. 15 illustrates a configuration of an informationreproducing/recording unit ex400 when data is read or written from or onan optical disk. The information reproducing/recording unit ex400includes constituent elements ex401, ex402, ex403, ex404, ex405, ex406,and ex407 to be described hereinafter. The optical head ex401 irradiatesa laser spot in a recording surface of the recording medium ex215 thatis an optical disk to write information, and detects reflected lightfrom the recording surface of the recording medium ex215 to read theinformation. The modulation recording unit ex402 electrically drives asemiconductor laser included in the optical head ex401, and modulatesthe laser light according to recorded data. The reproductiondemodulating unit ex403 amplifies a reproduction signal obtained byelectrically detecting the reflected light from the recording surfaceusing a photo detector included in the optical head ex401, anddemodulates the reproduction signal by separating a signal componentrecorded on the recording medium ex215 to reproduce the necessaryinformation. The buffer ex404 temporarily holds the information to berecorded on the recording medium ex215 and the information reproducedfrom the recording medium ex215. The disk motor ex405 rotates therecording medium ex215. The servo control unit ex406 moves the opticalhead ex401 to a predetermined information track while controlling therotation drive of the disk motor ex405 so as to follow the laser spot.The system control unit ex407 controls overall the informationreproducing/recording unit ex400. The reading and writing processes canbe implemented by the system control unit ex407 using variousinformation stored in the buffer ex404 and generating and adding newinformation as necessary, and by the modulation recording unit ex402,the reproduction demodulating unit ex403, and the servo control unitex406 that record and reproduce information through the optical headex401 while being operated in a coordinated manner. The system controlunit ex407 includes, for example, a microprocessor, and executesprocessing by causing a computer to execute a program for read andwrite.

Although the optical head ex401 irradiates a laser spot in thedescription, it may perform high-density recording using near fieldlight

FIG. 16 illustrates the recording medium ex215 that is the optical disk.On the recording surface of the recording medium ex215, guide groovesare spirally formed, and an information track ex230 records, in advance,address information indicating an absolute position on the diskaccording to change in a shape of the guide grooves. The addressinformation includes information for determining positions of recordingblocks ex231 that are a unit for recording data. Reproducing theinformation track ex230 and reading the address information in anapparatus that records and reproduces data can lead to determination ofthe positions of the recording blocks. Furthermore, the recording mediumex215 includes a data recording area ex233, an inner circumference areaex232, and an outer circumference area ex234. The data recording areaex233 is an area for use in recording the user data. The innercircumference area ex232 and the outer circumference area ex234 that areinside and outside of the data recording area ex233, respectively arefor specific use except for recording the user data. The informationreproducing/recording unit 400 reads and writes encoded audio, encodedvideo data, or multiplexed data obtained by multiplexing the encodedaudio and video data, from and on the data recording area ex233 of therecording medium ex215.

Although an optical disk having a layer, such as a DVD and a BD isdescribed as an example in the description, the optical disk is notlimited to such, and may be an optical disk having a multilayerstructure and capable of being recorded on a part other than thesurface. Furthermore, the optical disk may have a structure formultidimensional recording/reproduction, such as recording ofinformation using light of colors with different wavelengths in the sameportion of the optical disk and for recording information havingdifferent layers from various angles.

Furthermore, a car ex210 having an antenna ex205 can receive data fromthe satellite ex202 and others, and reproduce video on a display devicesuch as a car navigation system ex211 set in the car ex210, in thedigital broadcasting system ex200. Here, a configuration of the carnavigation system ex211 will be a configuration, for example, includinga GPS receiving unit from the configuration illustrated in FIG. 14. Thesame will be true for the configuration of the computer ex111, thecellular phone ex114, and others.

FIG. 17A illustrates the cellular phone ex114 that uses the movingpicture coding method described in embodiments. The cellular phone ex114includes: an antenna ex350 for transmitting and receiving radio wavesthrough the base station ex110; a camera unit ex365 capable of capturingmoving and still images; and a display unit ex358 such as a liquidcrystal display for displaying the data such as decoded video capturedby the camera unit ex365 or received by the antenna ex350. The cellularphone ex114 further includes: a main body unit including an operationkey unit ex366; an audio output unit ex357 such as a speaker for outputof audio; an audio input unit ex356 such as a microphone for input ofaudio; a memory unit ex367 for storing captured video or still pictures,recorded audio, coded data of the received video, the still pictures,e-mails, or others; and a slot unit ex364 that is an interface unit fora recording medium that stores data in the same manner as the memoryunit ex367.

Next, an example of a configuration of the cellular phone ex114 will bedescribed with reference to FIG. 17B. In the cellular phone ex114, amain control unit ex360 designed to control overall each unit of themain body including the display unit ex358 as well as the operation keyunit ex366 is connected mutually, via a synchronous bus ex370, to apower supply circuit unit ex361, an operation input control unit ex362,a video signal processing unit ex355, a camera interface unit ex363, aliquid crystal display (LCD) control unit ex359, amodulation/demodulation unit ex352, a multiplexing/demultiplexing unitex353, an audio signal processing unit ex354, the slot unit ex364, andthe memory unit ex367.

When a call-end key or a power key is turned ON by a user's operation,the power supply circuit unit ex361 supplies the respective units withpower from a battery pack so as to activate the cell phone ex114.

In the cellular phone ex114, the audio signal processing unit ex354converts the audio signals collected by the audio input unit ex356 invoice conversation mode into digital audio signals under the control ofthe main control unit ex360 including a CPU, ROM, and RAM. Then, themodulation/demodulation unit ex352 performs spread spectrum processingon the digital audio signals, and the transmitting and receiving unitex351 performs digital-to-analog conversion and frequency conversion onthe data, so as to transmit the resulting data via the antenna ex350.Also, in the cellular phone ex114, the transmitting and receiving unitex351 amplifies the data received by the antenna ex350 in voiceconversation mode and performs frequency conversion and theanalog-to-digital conversion on the data. Then, themodulation/demodulation unit ex352 performs inverse spread spectrumprocessing on the data, and the audio signal processing unit ex354converts it into analog audio signals, so as to output them via theaudio output unit ex357.

Furthermore, when an e-mail in data communication mode is transmitted,text data of the e-mail inputted by operating the operation key unitex366 and others of the main body is sent out to the main control unitex360 via the operation input control unit ex362. The main control unitex360 causes the modulation/demodulation unit ex352 to perform spreadspectrum processing on the text data, and the transmitting and receivingunit ex351 performs the digital-to-analog conversion and the frequencyconversion on the resulting data to transmit the data to the basestation ex110 via the antenna ex350. When an e-mail is received,processing that is approximately inverse to the processing fortransmitting an e-mail is performed on the received data, and theresulting data is provided to the display unit ex358.

When video, still images, or video and audio in data communication modeis or are transmitted, the video signal processing unit ex355 compressesand encodes video signals supplied from the camera unit ex365 using themoving picture encoding method shown in each of embodiments (i.e.,functions as the image encoding apparatus according to the aspect of thepresent disclosure), and transmits the encoded video data to themultiplexing/demultiplexing unit ex353. In contrast, during when thecamera unit ex365 captures video, still images, and others, the audiosignal processing unit ex354 encodes audio signals collected by theaudio input unit ex356, and transmits the encoded audio data to themultiplexing/demultiplexing unit ex353.

The multiplexing/demultiplexing unit ex353 multiplexes the encoded videodata supplied from the video signal processing unit ex355 and theencoded audio data supplied from the audio signal processing unit ex354,using a predetermined method. Then, the modulation/demodulation unit(modulation/demodulation circuit unit) ex352 performs spread spectrumprocessing on the multiplexed data, and the transmitting and receivingunit ex351 performs digital-to-analog conversion and frequencyconversion on the data so as to transmit the resulting data via theantenna ex350.

When receiving data of a video file which is linked to a Web page andothers in data communication mode or when receiving an e-mail with videoand/or audio attached, in order to decode the multiplexed data receivedvia the antenna ex350, the multiplexing/demultiplexing unit ex353demultiplexes the multiplexed data into a video data bit stream and anaudio data bit stream, and supplies the video signal processing unitex355 with the encoded video data and the audio signal processing unitex354 with the encoded audio data, through the synchronous bus ex370.The video signal processing unit ex355 decodes the video signal using amoving picture decoding method corresponding to the moving pictureencoding method shown in each of embodiments (i.e., functions as theimage decoding apparatus according to the aspect of the presentdisclosure), and then the display unit ex358 displays, for instance, thevideo and still images included in the video file linked to the Web pagevia the LCD control unit ex359. Furthermore, the audio signal processingunit ex354 decodes the audio signal, and the audio output unit ex357provides the audio.

Furthermore, similarly to the television ex300, a terminal such as thecellular phone ex114 probably have 3 types of implementationconfigurations including not only (i) a transmitting and receivingterminal including both an encoding apparatus and a decoding apparatus,but also (ii) a transmitting terminal including only an encodingapparatus and (iii) a receiving terminal including only a decodingapparatus. Although the digital broadcasting system ex200 receives andtransmits the multiplexed data obtained by multiplexing audio data ontovideo data in the description, the multiplexed data may be data obtainedby multiplexing not audio data but character data related to video ontovideo data, and may be not multiplexed data but video data itself.

As such, the moving picture coding method in each of embodiments can beused in any of the devices and systems described. Thus, the advantagesdescribed in each of embodiments can be obtained.

Furthermore, various modifications and revisions can be made in any ofthe embodiments in the present disclosure.

Embodiment 3

Video data can be generated by switching, as necessary, between (i) themoving picture encoding method or the moving picture encoding apparatusshown in each of embodiments and (ii) a moving picture encoding methodor a moving picture encoding apparatus in conformity with a differentstandard, such as MPEG-2, MPEG-4 AVC, and VC-1.

Here, when a plurality of video data that conforms to the differentstandards is generated and is then decoded, the decoding methods need tobe selected to conform to the different standards. However, since towhich standard each of the plurality of the video data to be decodedconforms cannot be detected, an appropriate decoding method cannot beselected.

In view of this, multiplexed data obtained by multiplexing audio dataand others onto video data has a structure including identificationinformation indicating to which standard the video data conforms. Thespecific structure of the multiplexed data including the video datagenerated in the moving picture encoding method and by the movingpicture encoding apparatus shown in each of embodiments will behereinafter described. The multiplexed data is a digital stream in theMPEG-2 Transport Stream format.

FIG. 18 illustrates a structure of the multiplexed data. As illustratedin FIG. 18, the multiplexed data can be obtained by multiplexing atleast one of a video stream, an audio stream, a presentation graphicsstream (PG), and an interactive graphics stream. The video streamrepresents primary video and secondary video of a movie, the audiostream (IG) represents a primary audio part and a secondary audio partto be mixed with the primary audio part, and the presentation graphicsstream represents subtitles of the movie. Here, the primary video isnormal video to be displayed on a screen, and the secondary video isvideo to be displayed on a smaller window in the primary video.Furthermore, the interactive graphics stream represents an interactivescreen to be generated by arranging the GUI components on a screen. Thevideo stream is encoded in the moving picture encoding method or by themoving picture encoding apparatus shown in each of embodiments, or in amoving picture encoding method or by a moving picture encoding apparatusin conformity with a conventional standard, such as MPEG-2, MPEG-4 AVC,and VC-1. The audio stream is encoded in accordance with a standard,such as Dolby-AC-3, Dolby Digital Plus, MLP, DTS, DTS-HD, and linearPCM.

Each stream included in the multiplexed data is identified by PID. Forexample, 0x1011 is allocated to the video stream to be used for video ofa movie, 0x1100 to 0x111F are allocated to the audio streams, 0x1200 to0x121F are allocated to the presentation graphics streams, 0x1400 to0x141F are allocated to the interactive graphics streams, 0x1B00 to0x1B1F are allocated to the video streams to be used for secondary videoof the movie, and 0x1A00 to 0x1A1F are allocated to the audio streams tobe used for the secondary audio to be mixed with the primary audio.

FIG. 19 schematically illustrates how data is multiplexed. First, avideo stream ex235 composed of video frames and an audio stream ex238composed of audio frames are transformed into a stream of PES packetsex236 and a stream of PES packets ex239, and further into TS packetsex237 and TS packets ex240, respectively. Similarly, data of apresentation graphics stream ex241 and data of an interactive graphicsstream ex244 are transformed into a stream of PES packets ex242 and astream of PES packets ex245, and further into TS packets ex243 and TSpackets ex246, respectively. These TS packets are multiplexed into astream to obtain multiplexed data ex247.

FIG. 20 illustrates how a video stream is stored in a stream of PESpackets in more detail. The first bar in FIG. 20 shows a video framestream in a video stream. The second bar shows the stream of PESpackets. As indicated by arrows denoted as yy1, yy2, yy3, and yy4 inFIG. 20, the video stream is divided into pictures as I pictures, Bpictures, and P pictures each of which is a video presentation unit, andthe pictures are stored in a payload of each of the PES packets. Each ofthe PES packets has a PES header, and the PES header stores aPresentation Time-Stamp (PTS) indicating a display time of the picture,and a Decoding Time-Stamp (DTS) indicating a decoding time of thepicture.

FIG. 21 illustrates a format of TS packets to be finally written on themultiplexed data. Each of the TS packets is a 188-byte fixed lengthpacket including a 4-byte TS header having information, such as a PIDfor identifying a stream and a 184-byte TS payload for storing data. ThePES packets are divided, and stored in the TS payloads, respectively.When a BD ROM is used, each of the TS packets is given a 4-byteTP_Extra_Header, thus resulting in 192-byte source packets. The sourcepackets are written on the multiplexed data. The TP_Extra_Header storesinformation such as an Arrival_Time_Stamp (ATS). The ATS shows atransfer start time at which each of the TS packets is to be transferredto a PID filter. The source packets are arranged in the multiplexed dataas shown at the bottom of FIG. 21. The numbers incrementing from thehead of the multiplexed data are called source packet numbers (SPNs).

Each of the TS packets included in the multiplexed data includes notonly streams of audio, video, subtitles and others, but also a ProgramAssociation Table (PAT), a Program Map Table (PMT), and a Program ClockReference (PCR). The PAT shows what a PID in a PMT used in themultiplexed data indicates, and a PID of the PAT itself is registered aszero. The PMT stores PIDs of the streams of video, audio, subtitles andothers included in the multiplexed data, and attribute information ofthe streams corresponding to the PIDs. The PMT also has variousdescriptors relating to the multiplexed data. The descriptors haveinformation such as copy control information showing whether copying ofthe multiplexed data is permitted or not. The PCR stores STC timeinformation corresponding to an ATS showing when the PCR packet istransferred to a decoder, in order to achieve synchronization between anArrival Time Clock (ATC) that is a time axis of ATSs, and an System TimeClock (STC) that is a time axis of PTSs and DTSs.

FIG. 22 illustrates the data structure of the PMT in detail. A PMTheader is disposed at the top of the PMT. The PMT header describes thelength of data included in the PMT and others. A plurality ofdescriptors relating to the multiplexed data is disposed after the PMTheader. Information such as the copy control information is described inthe descriptors. After the descriptors, a plurality of pieces of streaminformation relating to the streams included in the multiplexed data isdisposed. Each piece of stream information includes stream descriptorseach describing information, such as a stream type for identifying acompression codec of a stream, a stream PID, and stream attributeinformation (such as a frame rate or an aspect ratio). The streamdescriptors are equal in number to the number of streams in themultiplexed data.

When the multiplexed data is recorded on a recording medium and others,it is recorded together with multiplexed data information files.

Each of the multiplexed data information files is management informationof the multiplexed data as shown in FIG. 23. The multiplexed datainformation files are in one to one correspondence with the multiplexeddata, and each of the files includes multiplexed data information,stream attribute information, and an entry map.

As illustrated in FIG. 23, the multiplexed data information includes asystem rate, a reproduction start time, and a reproduction end time. Thesystem rate indicates the maximum transfer rate at which a system targetdecoder to be described later transfers the multiplexed data to a PIDfilter. The intervals of the ATSs included in the multiplexed data areset to not higher than a system rate. The reproduction start timeindicates a PTS in a video frame at the head of the multiplexed data. Aninterval of one frame is added to a PTS in a video frame at the end ofthe multiplexed data, and the PTS is set to the reproduction end time.

As shown in FIG. 24, a piece of attribute information is registered inthe stream attribute information, for each PID of each stream includedin the multiplexed data. Each piece of attribute information hasdifferent information depending on whether the corresponding stream is avideo stream, an audio stream, a presentation graphics stream, or aninteractive graphics stream. Each piece of video stream attributeinformation carries information including what kind of compression codecis used for compressing the video stream, and the resolution, aspectratio and frame rate of the pieces of picture data that is included inthe video stream. Each piece of audio stream attribute informationcarries information including what kind of compression codec is used forcompressing the audio stream, how many channels are included in theaudio stream, which language the audio stream supports, and how high thesampling frequency is. The video stream attribute information and theaudio stream attribute information are used for initialization of adecoder before the player plays back the information.

In the present embodiment, the multiplexed data to be used is of astream type included in the PMT. Furthermore, when the multiplexed datais recorded on a recording medium, the video stream attributeinformation included in the multiplexed data information is used. Morespecifically, the moving picture encoding method or the moving pictureencoding apparatus described in each of embodiments includes a step or aunit for allocating unique information indicating video data generatedby the moving picture encoding method or the moving picture encodingapparatus in each of embodiments, to the stream type included in the PMTor the video stream attribute information. With the configuration, thevideo data generated by the moving picture encoding method or the movingpicture encoding apparatus described in each of embodiments can bedistinguished from video data that conforms to another standard.

Furthermore, FIG. 25 illustrates steps of the moving picture decodingmethod according to the present embodiment. In Step exS100, the streamtype included in the PMT or the video stream attribute informationincluded in the multiplexed data information is obtained from themultiplexed data. Next, in Step exS101, it is determined whether or notthe stream type or the video stream attribute information indicates thatthe multiplexed data is generated by the moving picture encoding methodor the moving picture encoding apparatus in each of embodiments. When itis determined that the stream type or the video stream attributeinformation indicates that the multiplexed data is generated by themoving picture encoding method or the moving picture encoding apparatusin each of embodiments, in Step exS102, decoding is performed by themoving picture decoding method in each of embodiments. Furthermore, whenthe stream type or the video stream attribute information indicatesconformance to the conventional standards, such as MPEG-2, MPEG-4 AVC,and VC-1, in Step exS103, decoding is performed by a moving picturedecoding method in conformity with the conventional standards.

As such, allocating a new unique value to the stream type or the videostream attribute information enables determination whether or not themoving picture decoding method or the moving picture decoding apparatusthat is described in each of embodiments can perform decoding. Even whenmultiplexed data that conforms to a different standard is input, anappropriate decoding method or apparatus can be selected. Thus, itbecomes possible to decode information without any error. Furthermore,the moving picture encoding method or apparatus, or the moving picturedecoding method or apparatus in the present embodiment can be used inthe devices and systems described above.

Embodiment 4

Each of the moving picture coding method and the moving picture codingapparatus in each of embodiments is typically achieved in the form of anintegrated circuit or a Large Scale Integrated (LSI) circuit. As anexample of the LSI, FIG. 26 illustrates a configuration of the LSI ex500that is made into one chip. The LSI ex500 includes elements ex501,ex502, ex503, ex504, ex505, ex506, ex507, ex508, and ex509 to bedescribed below, and the elements are connected to each other through abus ex510. The power supply circuit unit ex505 is activated by supplyingeach of the elements with power when the power supply circuit unit ex505is turned on.

For example, when encoding is performed, the LSI ex500 receives an AVsignal from a microphone ex117, a camera ex113, and others through an AVIO ex509 under control of a control unit ex501 including a CPU ex502, amemory controller ex503, a stream controller ex504, and a drivingfrequency control unit ex512. The received AV signal is temporarilystored in an external memory ex511, such as an SDRAM. Under control ofthe control unit ex501, the stored data is segmented into data portionsaccording to the processing amount and speed to be transmitted to asignal processing unit ex507. Then, the signal processing unit ex507encodes an audio signal and/or a video signal. Here, the encoding of thevideo signal is the encoding described in each of embodiments.Furthermore, the signal processing unit ex507 sometimes multiplexes theencoded audio data and the encoded video data, and a stream IO ex506provides the multiplexed data outside. The provided multiplexed data istransmitted to the base station ex107, or written on the recordingmedium ex215. When data sets are multiplexed, the data should betemporarily stored in the buffer ex508 so that the data sets aresynchronized with each other.

Although the memory ex511 is an element outside the LSI ex500, it may beincluded in the LSI ex500. The buffer ex508 is not limited to onebuffer, but may be composed of buffers. Furthermore, the LSI ex500 maybe made into one chip or a plurality of chips.

Furthermore, although the control unit ex501 includes the CPU ex502, thememory controller ex503, the stream controller ex504, the drivingfrequency control unit ex512, the configuration of the control unitex501 is not limited to such. For example, the signal processing unitex507 may further include a CPU. Inclusion of another CPU in the signalprocessing unit ex507 can improve the processing speed. Furthermore, asanother example, the CPU ex502 may serve as or be a part of the signalprocessing unit ex507, and, for example, may include an audio signalprocessing unit. In such a case, the control unit ex501 includes thesignal processing unit ex507 or the CPU ex502 including a part of thesignal processing unit ex507.

The name used here is LSI, but it may also be called IC, system LSI,super LSI, or ultra LSI depending on the degree of integration.

Moreover, ways to achieve integration are not limited to the LSI, and aspecial circuit or a general purpose processor and so forth can alsoachieve the integration. Field Programmable Gate Array (FPGA) that canbe programmed after manufacturing LSIs or a reconfigurable processorthat allows re-configuration of the connection or configuration of anLSI can be used for the same purpose.

In the future, with advancement in semiconductor technology, a brand-newtechnology may replace LSI. The functional blocks can be integratedusing such a technology. The possibility is that the present disclosureis applied to biotechnology.

Embodiment 5

When video data generated in the moving picture encoding method or bythe moving picture encoding apparatus described in each of embodimentsis decoded, compared to when video data that conforms to a conventionalstandard, such as MPEG-2, MPEG-4 AVC, and VC-1 is decoded, theprocessing amount probably increases. Thus, the LSI ex500 needs to beset to a driving frequency higher than that of the CPU ex502 to be usedwhen video data in conformity with the conventional standard is decoded.However, when the driving frequency is set higher, the power consumptionincreases.

In view of this, the moving picture decoding apparatus, such as thetelevision ex300 and the LSI ex500 is configured to determine to whichstandard the video data conforms, and switch between the drivingfrequencies according to the determined standard. FIG. 27 illustrates aconfiguration ex800 in the present embodiment. A driving frequencyswitching unit ex803 sets a driving frequency to a higher drivingfrequency when video data is generated by the moving picture encodingmethod or the moving picture encoding apparatus described in each ofembodiments. Then, the driving frequency switching unit ex803 instructsa decoding processing unit ex801 that executes the moving picturedecoding method described in each of embodiments to decode the videodata. When the video data conforms to the conventional standard, thedriving frequency switching unit ex803 sets a driving frequency to alower driving frequency than that of the video data generated by themoving picture encoding method or the moving picture encoding apparatusdescribed in each of embodiments. Then, the driving frequency switchingunit ex803 instructs the decoding processing unit ex802 that conforms tothe conventional standard to decode the video data.

More specifically, the driving frequency switching unit ex803 includesthe CPU ex502 and the driving frequency control unit ex512 in FIG. 26.Here, each of the decoding processing unit ex801 that executes themoving picture decoding method described in each of embodiments and thedecoding processing unit ex802 that conforms to the conventionalstandard corresponds to the signal processing unit ex507 in FIG. 26. TheCPU ex502 determines to which standard the video data conforms. Then,the driving frequency control unit ex512 determines a driving frequencybased on a signal from the CPU ex502. Furthermore, the signal processingunit ex507 decodes the video data based on the signal from the CPUex502. For example, the identification information described inEmbodiment B is probably used for identifying the video data. Theidentification information is not limited to the one described inEmbodiment B but may be any information as long as the informationindicates to which standard the video data conforms. For example, whenwhich standard video data conforms to can be determined based on anexternal signal for determining that the video data is used for atelevision or a disk, etc., the determination may be made based on suchan external signal. Furthermore, the CPU ex502 selects a drivingfrequency based on, for example, a look-up table in which the standardsof the video data are associated with the driving frequencies as shownin FIG. 29. The driving frequency can be selected by storing the look-uptable in the buffer ex508 and in an internal memory of an LSI, and withreference to the look-up table by the CPU ex502.

FIG. 28 illustrates steps for executing a method in the presentembodiment. First, in Step exS200, the signal processing unit ex507obtains identification information from the multiplexed data. Next, inStep exS201, the CPU ex502 determines whether or not the video data isgenerated by the encoding method and the encoding apparatus described ineach of embodiments, based on the identification information. When thevideo data is generated by the moving picture encoding method and themoving picture encoding apparatus described in each of embodiments, inStep exS202, the CPU ex502 transmits a signal for setting the drivingfrequency to a higher driving frequency to the driving frequency controlunit ex512. Then, the driving frequency control unit ex512 sets thedriving frequency to the higher driving frequency. On the other hand,when the identification information indicates that the video dataconforms to the conventional standard, such as MPEG-2, MPEG-4 AVC, andVC-1, in Step exS203, the CPU ex502 transmits a signal for setting thedriving frequency to a lower driving frequency to the driving frequencycontrol unit ex512. Then, the driving frequency control unit ex512 setsthe driving frequency to the lower driving frequency than that in thecase where the video data is generated by the moving picture encodingmethod and the moving picture encoding apparatus described in each ofembodiment.

Furthermore, along with the switching of the driving frequencies, thepower conservation effect can be improved by changing the voltage to beapplied to the LSI ex500 or an apparatus including the LSI ex500. Forexample, when the driving frequency is set lower, the voltage to beapplied to the LSI ex500 or the apparatus including the LSI ex500 isprobably set to a voltage lower than that in the case where the drivingfrequency is set higher.

Furthermore, when the processing amount for decoding is larger, thedriving frequency may be set higher, and when the processing amount fordecoding is smaller, the driving frequency may be set lower as themethod for setting the driving frequency. Thus, the setting method isnot limited to the ones described above. For example, when theprocessing amount for decoding video data in conformity with MPEG-4 AVCis larger than the processing amount for decoding video data generatedby the moving picture encoding method and the moving picture encodingapparatus described in each of embodiments, the driving frequency isprobably set in reverse order to the setting described above.

Furthermore, the method for setting the driving frequency is not limitedto the method for setting the driving frequency lower. For example, whenthe identification information indicates that the video data isgenerated by the moving picture encoding method and the moving pictureencoding apparatus described in each of embodiments, the voltage to beapplied to the LSI ex500 or the apparatus including the LSI ex500 isprobably set higher. When the identification information indicates thatthe video data conforms to the conventional standard, such as MPEG-2,MPEG-4 AVC, and VC-1, the voltage to be applied to the LSI ex500 or theapparatus including the LSI ex500 is probably set lower. As anotherexample, when the identification information indicates that the videodata is generated by the moving picture encoding method and the movingpicture encoding apparatus described in each of embodiments, the drivingof the CPU ex502 does not probably have to be suspended. When theidentification information indicates that the video data conforms to theconventional standard, such as MPEG-2, MPEG-4 AVC, and VC-1, the drivingof the CPU ex502 is probably suspended at a given time because the CPUex502 has extra processing capacity. Even when the identificationinformation indicates that the video data is generated by the movingpicture encoding method and the moving picture encoding apparatusdescribed in each of embodiments, in the case where the CPU ex502 hasextra processing capacity, the driving of the CPU ex502 is probablysuspended at a given time. In such a case, the suspending time isprobably set shorter than that in the case where when the identificationinformation indicates that the video data conforms to the conventionalstandard, such as MPEG-2, MPEG-4 AVC, and VC-1.

Accordingly, the power conservation effect can be improved by switchingbetween the driving frequencies in accordance with the standard to whichthe video data conforms. Furthermore, when the LSI ex500 or theapparatus including the LSI ex500 is driven using a battery, the batterylife can be extended with the power conservation effect.

Embodiment 6

There are cases where a plurality of video data that conforms todifferent standards, is provided to the devices and systems, such as atelevision and a cellular phone. In order to enable decoding theplurality of video data that conforms to the different standards, thesignal processing unit ex507 of the LSI ex500 needs to conform to thedifferent standards. However, increase in the scale of the circuit ofthe LSI ex500 and increase in the cost arise with the individual use ofthe signal processing units ex507 that conform to the respectivestandards.

In view of this, what is conceived is a configuration in which thedecoding processing unit for implementing the moving picture decodingmethod described in each of embodiments and the decoding processing unitthat conforms to the conventional standard, such as MPEG-2, MPEG-4 AVC,and VC-1 are partly shared. Ex900 in FIG. 30A shows an example of theconfiguration. For example, the moving picture decoding method describedin each of embodiments and the moving picture decoding method thatconforms to MPEG-4 AVC have, partly in common, the details ofprocessing, such as entropy encoding, inverse quantization, deblockingfiltering, and motion compensated prediction. The details of processingto be shared probably include use of a decoding processing unit ex902that conforms to MPEG-4 AVC. In contrast, a dedicated decodingprocessing unit ex901 is probably used for other processing which isunique to an aspect of the present disclosure and does not conform toMPEG-4 AVC. Since the aspect of the present disclosure is characterizedby inverse quantization in particular, for example, the dedicateddecoding processing unit ex901 is used for inverse quantization.Otherwise, the decoding processing unit is probably shared for one ofthe entropy decoding, deblocking filtering, and motion compensation, orall of the processing. The decoding processing unit for implementing themoving picture decoding method described in each of embodiments may beshared for the processing to be shared, and a dedicated decodingprocessing unit may be used for processing unique to that of MPEG-4 AVC.

Furthermore, ex1000 in FIG. 30B shows another example in that processingis partly shared. This example uses a configuration including adedicated decoding processing unit ex1001 that supports the processingunique to an aspect of the present disclosure, a dedicated decodingprocessing unit ex1002 that supports the processing unique to anotherconventional standard, and a decoding processing unit ex1003 thatsupports processing to be shared between the moving picture decodingmethod according to the aspect of the present disclosure and theconventional moving picture decoding method. Here, the dedicateddecoding processing units ex1001 and ex1002 are not necessarilyspecialized for the processing according to the aspect of the presentdisclosure and the processing of the conventional standard,respectively, and may be the ones capable of implementing generalprocessing. Furthermore, the configuration of the present embodiment canbe implemented by the LSI ex500.

As such, reducing the scale of the circuit of an LSI and reducing thecost are possible by sharing the decoding processing unit for theprocessing to be shared between the moving picture decoding methodaccording to the aspect of the present disclosure and the moving picturedecoding method in conformity with the conventional standard.

In summary, the present disclosure relates to deblocking filtering whichis applicable to smoothing the block boundaries in an image or videocoding and decoding. In particular, the deblocking filtering is appliedto a sample at a boundary of a block in accordance with a predeterminedparameter. The predetermined parameter is used to offset the sample as apart of its filtering. In accordance with the disclosure, this parameteris determined by calculating a weighted sum of the surrounding samplesat the boundary, by offsetting it with a value depending on the value ofthe weighted sum, and by shifting the result by a predetermined numberof bits to the right.

The present disclosure relates to deblocking filtering which isapplicable to smoothing the block boundaries in an image or video codingand decoding. In particular, the deblocking filtering is either strongor weak, wherein the clipping is performed differently in strongfiltering and the weak filtering.

Each of the structural elements in each of the above-describedembodiments may be configured in the form of an exclusive hardwareproduct, or may be realized by executing a software program suitable forthe structural element. Each of the structural elements may be realizedby means of a program executing unit, such as a CPU and a processor,reading and executing the software program recorded on a recordingmedium such as a hard disk or a semiconductor memory. Here, the softwareprogram for realizing the method for deblocking filtering of imagesaccording to each of the embodiments is a program described below.

The program causes a computer to execute: judging whether a strong or aweak filter is to be applied; calculating a weighted sum of the sampleand adjacent samples at a boundary between the current block and aneighboring block, the samples forming a line of samples; adding anoffset to the weighted sum; shifting the offset weighted sum right by apredetermined number of bits; and clipping a result of the shifting,wherein the clipping for strong filtering is controlled by a clippingparameter different from a parameter controlling the clipping for weakfiltering.

The herein disclosed subject matter is to be considered descriptive andillustrative only, and the appended Claims are of a scope intended tocover and encompass not only the particular embodiment(s) disclosed, butalso equivalent structures, methods, and/or uses.

1. A filtering method for applying a deblocking filter to a currentblock of an image, the filtering method comprising: judging whether astrong filter or a weak filter is to be applied to a boundary betweenthe current block and a neighboring block adjacent to the current block;calculating a linear combination of current samples in the current blockand adjacent samples in the neighboring block, the current samples andthe adjacent samples forming a line of samples; shifting the linearcombination right by a predetermined number of bits; and clipping theshifted linear combination to generate a filtered sample of the filteredcurrent block, wherein the clipping for the strong filter is controlledby a first clipping parameter and the clipping for the weak filter iscontrolled by a second clipping parameter, the first clipping parameterand the second clipping parameter depending on a strength of theboundary but having a different value with each other.
 2. The filteringmethod according to claim 1, wherein the first and the second clippingparameters control upper and lower clipping thresholds.
 3. The filteringmethod according to claim 1, wherein the strong deblocking filter isapplied to three adjacent samples in the line of samples, wherein theweak deblocking filter is applied to one or two adjacent samples.
 4. Thefiltering method according to claim 1, wherein the judging includes:judging whether the deblocking filter is to be applied to the boundary;and applying the deblocking filter to the boundary, when the deblockingfilter is judged to be applied.
 5. A method for encoding a current blockof an image including a plurality of pixels, the method comprising:compressing and reconstructing the current block; and applying thedeblocking filter according to claim 1 to the reconstructed block.
 6. Amethod for decoding a coded current block of an image including aplurality of pixels, the method comprising: reconstructing the codedcurrent block; and applying the deblocking filter according to claim 1to the reconstructed block.
 7. A computer program product comprising acomputer-readable medium having a computer-readable program codeembodied thereon, the program code being adapted to carry out the methodaccording to claim
 1. 8. An apparatus for applying a deblocking filterto a sample in a current block of an image during encoding the currentblock into a bitstream or decoding of the current block from abitstream, the apparatus comprising: a judging unit for judging whethera strong filter or a weak filter is to be applied; a calculating unitfor calculating a linear combination of the sample and adjacent samplesat the boundary between a current block and its neighboring block, thesamples forming a line of samples; an adder for adding an offset to thelinear combination; a shifting unit for shifting the offset linearcombination right by a predetermined number of bits; and a filteringunit for clipping the result of shifting, wherein the clipping for thestrong filter is controlled by a clipping parameter different from theparameter controlling the clipping for the weak filter.
 9. An apparatusfor encoding a current block of an image including a plurality ofpixels, the apparatus comprising: an encoder with a decoder forcompressing and reconstructing the current block; and the apparatus forfiltering according to claim 8 the reconstructed block.
 10. An apparatusfor decoding a coded current block of an image including a plurality ofpixels, the apparatus comprising: a decoder for reconstructing the codedcurrent block; and the apparatus for filtering according to claim 8 thereconstructed block.
 11. An integrated circuit for embodying theapparatus according to claim 8 further comprising a memory, which is avertical and/or horizontal line memory for storing pixels to befiltered.
 12. A filtering apparatus for applying a deblocking filter toa current block of an image, the filtering apparatus comprising: ajudging unit for judging whether a strong filter or a weak filter is tobe applied to a boundary between the current block and a neighboringblock adjacent to the current block; a calculating unit for calculatinga linear combination of current samples in the current block andadjacent samples in the neighboring block, the current samples and theadjacent samples forming a line of samples; a shifting unit for shiftingthe linear combination right by a predetermined number of bits; and aclipping unit for clipping the shifted linear combination to generate afiltered sample of the filtered current block, wherein the clipping unitcontrols the clipping for the strong filter by a first clippingparameter and the clipping for the weak filter by a second clippingparameter, the first clipping parameter and the second clippingparameter depending on a strength of the boundary but having a differentvalue with each other.